Ir al final de los metadatos
Ir al inicio de los metadatos

Estás viendo una versión antigua de esta página. Ve a la versión actual.

Comparar con el actual Ver el historial de la página

« Anterior Versión 2 Siguiente »

Required Software

 

Adding new metrics

There are two kinds of metrics that can be logged: values and events.

Values correspond to measurements of a certain quantity, like number of online players or the update diff time.

Events are something that occurs in an instant of time, e.g, a player login, worldserver shutdown, etc.

 

To log new metrics, call TC_METRIC_EVENT or TC_METRIC_VALUE and add a new graph to the dashboard.

Examples
// 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_VALUE(category, value)
  • 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.
  • value: A measurement, it can be a 

Additional Reading

Learn more about InfluxDB and Grafana:

  • Sin etiquetas