As an example, see "components/test_server_telemetry_metrics" test component source code, used to test this service.