Package com.io7m.idstore.server.service.telemetry.api

# Interface IdMetricsServiceType

All Superinterfaces:
  `AutoCloseable`, `com.io7m.repetoir.core.RPServiceType`

All Known Implementing Classes:
  `IdMetricsService`

public interface IdMetricsServiceType extends AutoCloseable, com.io7m.repetoir.core.RPServiceType
The interface exposed by the metrics service.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onHttp2xx(IdUserDomain type)`
  An HTTP request resulted in a 2xx success.
  `void`
  `onHttp4xx(IdUserDomain type)`
  An HTTP request resulted in a 4xx error.
  `void`
  `onHttp5xx(IdUserDomain type)`
  An HTTP request resulted in a 5xx error.
  `void`
  `onHttpRequested(IdUserDomain type)`
  An HTTP request was received.
  `void`
  `onHttpRequestSize(IdUserDomain type, long size)`
  An HTTP request was received of a given size.
  `void`
  `onHttpResponseSize(IdUserDomain type, long size)`
  An HTTP response was produced of a given size.
  `void`
  `onHttpResponseTime(IdUserDomain type, Duration time)`
  An HTTP response was produced in the given time.
  `void`
  `onLogin(IdUserDomain type, long countNow)`
  A login session was created.
  `void`
  `onLoginClosed(IdUserDomain type, long countNow)`
  A login session was closed or expired.
  `void`
  `onLoginPauseTime(IdUserDomain type, Duration duration)`
  The login pause time is known.
  `void`
  `onMailFailed(IdEmail address, Duration time)`
  Mail could not be sent to the given address.
  `void`
  `onMailSent(IdEmail address, Duration time)`
  Mail was sent to the given address.
  `void`
  `onRateLimitTriggered(String name, String host, String user, String operation)`
  A rate limit was triggered.

  ### Methods inherited from interface java.lang.AutoCloseable

  `close`

  ### Methods inherited from interface com.io7m.repetoir.core.RPServiceType

  `description`

- ## Method Details

  - ### onHttpRequested

    void onHttpRequested(IdUserDomain type)
    An HTTP request was received.
    Parameters:
      `type` - The user domain

  - ### onHttp5xx

    void onHttp5xx(IdUserDomain type)
    An HTTP request resulted in a 5xx error.
    Parameters:
      `type` - The user domain

  - ### onHttp2xx

    void onHttp2xx(IdUserDomain type)
    An HTTP request resulted in a 2xx success.
    Parameters:
      `type` - The user domain

  - ### onHttp4xx

    void onHttp4xx(IdUserDomain type)
    An HTTP request resulted in a 4xx error.
    Parameters:
      `type` - The user domain

  - ### onHttpRequestSize

    void onHttpRequestSize(IdUserDomain type, long size)
    An HTTP request was received of a given size.
    Parameters:
      `type` - The user domain
      `size` - The size

  - ### onHttpResponseSize

    void onHttpResponseSize(IdUserDomain type, long size)
    An HTTP response was produced of a given size.
    Parameters:
      `type` - The user domain
      `size` - The size

  - ### onMailSent

    void onMailSent(IdEmail address, Duration time)
    Mail was sent to the given address.
    Parameters:
      `address` - The address
      `time` - The time it took

  - ### onMailFailed

    void onMailFailed(IdEmail address, Duration time)
    Mail could not be sent to the given address.
    Parameters:
      `address` - The address
      `time` - The time it took

  - ### onRateLimitTriggered

    void onRateLimitTriggered(String name, String host, String user, String operation)
    A rate limit was triggered.
    Parameters:
      `name` - The rate name
      `host` - The host
      `user` - The user
      `operation` - The operation

  - ### onHttpResponseTime

    void onHttpResponseTime(IdUserDomain type, Duration time)
    An HTTP response was produced in the given time.
    Parameters:
      `type` - The user domain
      `time` - The time

  - ### onLogin

    void onLogin(IdUserDomain type, long countNow)
    A login session was created.
    Parameters:
      `type` - The type of session
      `countNow` - The number of sessions now active

  - ### onLoginClosed

    void onLoginClosed(IdUserDomain type, long countNow)
    A login session was closed or expired.
    Parameters:
      `type` - The type of session
      `countNow` - The number of sessions now active

  - ### onLoginPauseTime

    void onLoginPauseTime(IdUserDomain type, Duration duration)
    The login pause time is known.
    Parameters:
      `type` - The user domain
      `duration` - The pause time