Class IdMetricsService
java.lang.Object
com.io7m.idstore.server.service.telemetry.api.IdMetricsService
- All Implemented Interfaces:
IdMetricsServiceType,com.io7m.repetoir.core.RPServiceType,AutoCloseable
The metrics service.
-
Constructor Summary
ConstructorsConstructorDescriptionIdMetricsService(IdServerTelemetryServiceType telemetry) The metrics service. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidonClosedForMaintenance(boolean closed) The server is open for business, or closed for maintenance.voidonHttp2xx(IdUserDomain type) An HTTP request resulted in a 2xx success.voidonHttp4xx(IdUserDomain type) An HTTP request resulted in a 4xx error.voidonHttp5xx(IdUserDomain type) An HTTP request resulted in a 5xx error.voidonHttpRequested(IdUserDomain type) An HTTP request was received.voidonHttpRequestSize(IdUserDomain type, long size) An HTTP request was received of a given size.voidonHttpResponseSize(IdUserDomain type, long size) An HTTP response was produced of a given size.voidonHttpResponseTime(IdUserDomain type, Duration time) An HTTP response was produced in the given time.voidonLogin(IdUserDomain type, long countNow) A login session was created.voidonLoginClosed(IdUserDomain type, long countNow) A login session was closed or expired.voidonLoginPauseTime(IdUserDomain type, Duration duration) The login pause time is known.voidonMailFailed(IdEmail address, Duration time) Mail could not be sent to the given address.voidonMailSent(IdEmail address, Duration time) Mail was sent to the given address.voidonRateLimitTriggered(String name, String host, String user, String operation) A rate limit was triggered.toString()
-
Constructor Details
-
IdMetricsService
The metrics service.- Parameters:
telemetry- The underlying telemetry system
-
-
Method Details
-
toString
-
description
- Specified by:
descriptionin interfacecom.io7m.repetoir.core.RPServiceType
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
onHttpRequested
Description copied from interface:IdMetricsServiceTypeAn HTTP request was received.- Specified by:
onHttpRequestedin interfaceIdMetricsServiceType- Parameters:
type- The user domain
-
onHttp5xx
Description copied from interface:IdMetricsServiceTypeAn HTTP request resulted in a 5xx error.- Specified by:
onHttp5xxin interfaceIdMetricsServiceType- Parameters:
type- The user domain
-
onHttp2xx
Description copied from interface:IdMetricsServiceTypeAn HTTP request resulted in a 2xx success.- Specified by:
onHttp2xxin interfaceIdMetricsServiceType- Parameters:
type- The user domain
-
onHttp4xx
Description copied from interface:IdMetricsServiceTypeAn HTTP request resulted in a 4xx error.- Specified by:
onHttp4xxin interfaceIdMetricsServiceType- Parameters:
type- The user domain
-
onHttpRequestSize
Description copied from interface:IdMetricsServiceTypeAn HTTP request was received of a given size.- Specified by:
onHttpRequestSizein interfaceIdMetricsServiceType- Parameters:
type- The user domainsize- The size
-
onHttpResponseSize
Description copied from interface:IdMetricsServiceTypeAn HTTP response was produced of a given size.- Specified by:
onHttpResponseSizein interfaceIdMetricsServiceType- Parameters:
type- The user domainsize- The size
-
onMailSent
Description copied from interface:IdMetricsServiceTypeMail was sent to the given address.- Specified by:
onMailSentin interfaceIdMetricsServiceType- Parameters:
address- The addresstime- The time it took
-
onMailFailed
Description copied from interface:IdMetricsServiceTypeMail could not be sent to the given address.- Specified by:
onMailFailedin interfaceIdMetricsServiceType- Parameters:
address- The addresstime- The time it took
-
onRateLimitTriggered
Description copied from interface:IdMetricsServiceTypeA rate limit was triggered.- Specified by:
onRateLimitTriggeredin interfaceIdMetricsServiceType- Parameters:
name- The rate namehost- The hostuser- The useroperation- The operation
-
onHttpResponseTime
Description copied from interface:IdMetricsServiceTypeAn HTTP response was produced in the given time.- Specified by:
onHttpResponseTimein interfaceIdMetricsServiceType- Parameters:
type- The user domaintime- The time
-
onLogin
Description copied from interface:IdMetricsServiceTypeA login session was created.- Specified by:
onLoginin interfaceIdMetricsServiceType- Parameters:
type- The type of sessioncountNow- The number of sessions now active
-
onLoginClosed
Description copied from interface:IdMetricsServiceTypeA login session was closed or expired.- Specified by:
onLoginClosedin interfaceIdMetricsServiceType- Parameters:
type- The type of sessioncountNow- The number of sessions now active
-
onLoginPauseTime
Description copied from interface:IdMetricsServiceTypeThe login pause time is known.- Specified by:
onLoginPauseTimein interfaceIdMetricsServiceType- Parameters:
type- The user domainduration- The pause time
-
onClosedForMaintenance
public void onClosedForMaintenance(boolean closed) Description copied from interface:IdMetricsServiceTypeThe server is open for business, or closed for maintenance.- Specified by:
onClosedForMaintenancein interfaceIdMetricsServiceType- Parameters:
closed-trueif the server is closed
-