Skip to main content

Analytics APIs and Schemas

Analytics Schema

Example: Microservices and Pageview Health Dashboard

Diagram examples

Page View Table

ColumnTypeDescription
page_view_idintegerPrimary key for the page view
user_idintegerForeign key to the user table
page_urlstringURL of the page viewed
timestampdatetimeTimestamp of when the page was viewed
created_atdatetimeTimestamp of when the page view record was created
updated_atdatetimeTimestamp of when the page view record was last updated

User Table

ColumnTypeDescription
user_idintegerPrimary key for the user
usernamestringUsername for the user
emailstringEmail address for the user
created_atdatetimeTimestamp of when the user was created
updated_atdatetimeTimestamp of when the user was last updated

Service View Table

ColumnTypeDescription
service_view_idintegerPrimary key for the service view
user_idintegerForeign key to the user table
service_namestringName of the service viewed
timestampdatetimeTimestamp of when the service was viewed
created_atdatetimeTimestamp of when the service view record was created
updated_atdatetimeTimestamp of when the service view record was last updated

Error Log Table

ColumnTypeDescription
error_log_idintegerPrimary key for the error log
user_idintegerForeign key to the user table
error_codestringCode for the error that occurred
error_messagestringDetailed error message
timestampdatetimeTimestamp of when the error occurred
created_atdatetimeTimestamp of when the error log record was created
updated_atdatetimeTimestamp of when the error log record was last updated

Service Performance Table

ColumnTypeDescription
service_performance_idintegerPrimary key for the service performance record
service_namestringName of the service being measured
response_timefloatResponse time for the service, in milliseconds
timestampdatetimeTimestamp of when the performance data was collected
created_atdatetimeTimestamp of when the performance record was created
updated_atdatetimeTimestamp of when the performance record was last updated

Dashboard Settings Table

ColumnTypeDescription
dashboard_settings_idintegerPrimary key for the dashboard settings record
user_idintegerForeign key to the user table
layoutstringLayout of the user's dashboard
widgetsjsonJSON object containing user's widget preferences
created_atdatetimeTimestamp of when the dashboard settings record was created
updated_atdatetimeTimestamp of when the dashboard settings record was last updated

Analytics APIs

APIs and Microservices

Database Schemas