Copyright © 2013-2021 Maas-Maarten Zeeman
Behaviours: gen_server.
Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
init_site/1 | Setup stats for each site. |
init_system/0 | Initialize the statistics collection machinery. |
log_access/1 | Collect log data from cowmachine and update cowmachine metrics. |
record_count/4 | Count some amount, like data transfers. |
record_duration/4 | Record a duration. |
record_event/3 | Count a event. |
start_link/1 | Start the log buffer consumer. |
system_usage/1 |
handle_call(Cmd, From, State) -> any()
handle_cast(Cmd, State) -> any()
handle_info(X1, State) -> any()
init(Buffers) -> any()
init_site(Site) -> any()
Setup stats for each site.
init_system() -> any()
Initialize the statistics collection machinery.
log_access(MetricsData) -> any()
Collect log data from cowmachine and update cowmachine metrics
The log entry from zotonic_listen_http_metrics is:Log = #{ site => Site, reason => Reason, req_start => ReqStart, duration_total_usec => DurationTotalUsec, duration_process_usec => DurationProcessUsec, resp_status => RespStatus, resp_status_category => StatusCategory, req_bytes => ReqBodyLength, resp_bytes => RespBodyLength, http_version => cowboy_req:version(Req), method => cowboy_req:method(Req), path => cowboy_req:path(Req), user_agent => cowboy_req:header(<<"user-agent">>, Req), referer => cowboy_req:header(<<"referer">>, Req), metrics => UserData#{ peer_ip => PeerIP } }
record_count(System, What, Count, Context) -> any()
Count some amount, like data transfers
record_duration(System, What, Duration, Context) -> any()
Record a duration
record_event(System, What, Context) -> any()
Count a event
start_link(Buffers) -> any()
Start the log buffer consumer.
system_usage(X1) -> any()
Generated by EDoc