...
Bloque de código | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
// Registering player logins: in WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) TC_METRIC_EVENT("player_events", "Login", pCurrChar->GetName()); // TC_METRIC_EVENT(category, title, description) // Logging the update diff time: in World::Update(uint32 diff) TC_METRIC_VALUE("update_time_diff", diff); // |
TC_METRIC_
...
EVENT(category,
...
title, description)
- category: Arbitrary string, table where the values and events are stored. By convention, event logs should be suffixed by "_events".;
- title: Name of the event log.;
- description: Additional info about a log event.;
TC_METRIC_VALUE(category, value)
- category: Same as above;
- value: A measurement, it can be a have one of the following types: bool, std::string, float, double or any integral type (int, int32, uint, etc).
Additional Reading
Learn more about InfluxDB and Grafana:
...