ActiveUserSessionsEvent¶
- pydantic model gafaelfawr.events.ActiveUserSessionsEvent¶
Current count of the number of active user sessions.
These correspond to unexpired
session
tokens, which in turn correspond to unexpired user browser session cookies.Notes
This is really a proper metric that is measured periodically, not an event. For now, Gafaelfawr uses the event system to log this metric since that’s the system we have in place. If we later have a proper metrics system for storing measurements, this should move to that.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "ActiveUserSessionsEvent", "description": "Current count of the number of active user sessions.\n\nThese correspond to unexpired ``session`` tokens, which in turn correspond\nto unexpired user browser session cookies.\n\nNotes\n-----\nThis is really a proper metric that is measured periodically, not an\nevent. For now, Gafaelfawr uses the event system to log this metric since\nthat's the system we have in place. If we later have a proper metrics\nsystem for storing measurements, this should move to that.", "type": "object", "properties": { "count": { "description": "Number of unexpired user session tokens", "title": "Active user sessions", "type": "integer" } }, "required": [ "count" ] }
- Fields:
- field count: int [Required]¶
Number of unexpired user session tokens
- asdict()¶
Returns this model in dictionary form. This method differs from pydantic’s dict by converting all values to their Avro representation. It also doesn’t provide the exclude, include, by_alias, etc. parameters that dict provides.
- classmethod fake(**data)¶
Creates a fake instance of the model.
- Attributes:
data: Dict[str, Any] represent the user values to use in the instance
- Parameters:
data (
Any
)- Return type:
AvroBaseModel
- serialize(serialization_type='avro')¶
Overrides the base AvroModel’s serialize method to inject this class’s standardization factory method