Telemetry is a specification to instrument all the key events. Using this specification reference applications & services will generate telemetry events. For more info refer Sunbird-Telemetry documentation here. Also to know how telemetry is processed refer to Telemetry Processing Documentation in https://lern.sunbird.org/learn/telemetry-processing.
Logs also use telemetry specification and request tracing/ tracking is accomplished by passing the request context into the logs and telemetry. This helps in troubleshooting issues. Request context has below details:
uid //user id from user authentication token in header (x-authenticated-user-token)
did //device id from request header (x-device-id)
sid //session id from request header (x-session-id)
reqId //request id from request header (x-request-id)
This request id also set to API response as msgid. This helps in tracking once request that invokes multiple APIs and flows.
Configuration
Telemetry has request context information and it is set during the telemetry logging.
Below are the properties set by the application to add the producer information into the telemetry data:
Telemetry is processed using logback in LMS service. logback.xml configuration has a ConsoleAppender, which will log the telemetry generated by the code to console. In server, these logs are then pushed to graylog for troubleshooting.