- Collect only the data that’s required, and nothing more
- Require explicit user opt-in for any feature that could capture sensitive data
- Offer extensive configuration options to control data collection, masking and filtering
- Provide full transparency about what data is collected and how it’s handled
Data collection
This is a complete overview of the data collected by Apitally. = Potentially sensitive and not collected by default.Application metadata
The following data is collected once on application startup.Endpoints
Endpoints
HTTP method and path of all routes registered in your application.Example:
Versions
Versions
Versions of the Apitally SDK, your framework and runtime.Example:
Metrics & analytics
The following data is collected for each request handled by your application and immediately aggregated on the client-side.HTTP method and path
HTTP method and path
Method and path of the endpoint that handled the request.Example:
POST /v1/ordersResponse status code
Response status code
Status code of the response.Example:
200 OKRequest size
Request size
Size of the request body. Recorded as a histogram in 1 KB buckets.Example:
5 KBResponse size
Response size
Size of the response body. Recorded as a histogram in 1 KB buckets.Example:
5 KBResponse time
Response time
Time elapsed between start and finish of the route handler invokation for the request. Recorded as a histogram in 10 ms buckets.Example:
80 msConsumer identifier, and optionally name and group, as provided by your own implementation.See the setup guide for your framework for how to associate requests with consumers.Example:
Validation error info
Validation error info
Details about validation errors leading to a
4xx response. Includes error type, message and field name. Doesn’t include the invalid value.Only captured if a supported framework is used. See here for details.Example:Exception info
Exception info
Exception message and stack trace. May also include a Sentry event ID, if available.Only captured if an unhandled exception occurred during the handling of the request, leading to a
500 Internal Server Error response.Example:Request logs
The following data is collected for each request handled by your application, if request logging is enabled.HTTP method and path
HTTP method and path
Method and path of the endpoint that handled the request.Example:
POST /v1/ordersURL
URL
The full request URL.Query parameters can be stripped by disabling
log_query_params (enabled by default). Default masking rules apply to query parameters. Additional masking rules can be specified using mask_query_params.Example: https://api.example.com/v1/books?search=api+designResponse status code
Response status code
Example:
200 OKRequest size
Request size
Size of the request body in bytes.Example:
4786 bytesOnly collected if enabled via
log_request_headers (disabled by default). Default masking rules apply. Additional masking rules can be specified using mask_headers.Example:Only collected if enabled via
log_request_body (disabled by default). Default masking rules apply. Additional masking rules can be specified using mask_body_fields and mask_request_body_callback.Example:Response size
Response size
Size of the response body in bytes.Example:
4678 bytesResponse headers
Response headers
Can be disabled via
log_response_headers (enabled by default). Default masking rules apply. Additional masking rules can be specified using mask_headers.Example:Only collected if enabled via
log_response_body (disabled by default). Default masking rules apply. Additional masking rules can be specified using mask_body_fields and mask_response_body_callback.Example:Response time
Response time
Time elapsed between start and finish of the route handler invokation for the request.Example:
82 msConsumer identifier, and optionally name and group, as provided by your own implementation.See the setup guide for your framework for how to associate requests with consumers.Example:
Log messages emitted by the application during the handling of the request.Only collected if enabled via
capture_logs (disabled by default).Example:Exception info
Exception info
Exception message and stack trace. May also include a Sentry event ID, if available.Only captured if an unhandled exception occurred during the handling of the request, leading to a
500 Internal Server Error response. Can be disabled via log_exception (enabled by default).Example:Data masking
The Apitally SDKs mask common sensitive query parameters, headers and request/response body fields on the client side based on the below default patterns (regular expressions). You can add additional patterns using the configuration options mentioned below. Patterns are case-insensitive and match anywhere within the name.Query parameters
mask_query_params option.
Headers
mask_headers option.
Body fields
mask_body_fields option. For more granular control you can also specify callback functions via mask_request_body_callback and mask_response_body_callback.
Data filtering
The Apitally SDK automatically excludes requests to common health check endpoints from the request logs (not metrics) using the patterns below. They are applied to the request path.exclude_paths option. For more granular control you can also provide a callback function via exclude_callbacks.
These exclusions don’t impact metrics. If you’d like to exclude certain endpoints from metrics, you can mark them as excluded in the dashboard. See here for details.