- Get real-time metrics on API usage, errors, and performance
- Track API adoption and usage by individual consumers
- Log and inspect API requests and responses
- Capture application logs, correlated with API requests
- Monitor uptime and set up custom alerts
Create app
To get started, create a new app in the Apitally dashboard and select as your framework.
prod
and dev
) for your app, or simply accept the defaults.
Take a note of the client ID displayed after submitting. You will need it in the next step.
Add middleware
Add the Apitally SDK to the dependencies in your Fiber project.ClientId
for your app.
You’ll find the ClientId
on the Setup instructions page for your app in the Apitally dashboard, which is displayed immediately after creating the app.
Add the Apitally middleware before any other middleware to ensure it wraps the entire stack.
At this point the basic setup for your application is complete and you will start seeing data in the Apitally dashboard.
Identify consumers
To analyze and filter API traffic by consumers, you can associate requests with consumer identifiers in your application. In most cases, use the authenticated identity to identify the consumer. The identifier should be a string, such as a username, email address, or any other unique identifier. Optionally, you can also provide a display name and group for each consumer. To associate requests with consumers, use theSetConsumerIdentifier
or SetConsumer
function, for example in a middleware.
The Consumers dashboard now shows all consumers that have made requests to your application. You can also filter other dashboards by consumer.
Capture validation errors
If you’re using thego-playground/validator/v10
package to validate incoming data, you can use the CaptureValidationError
function to record validation errors.
This gives you visibility into the validation errors returned by your API endpoints.
Configure request logging
Logging of individual requests and responses is disabled by default to protect potentially sensitive data. If you enable it, you can configure in detail what parts of the request and response should be logged. You can also mask sensitive information (e.g. in headers) and exclude certain requests from logging. The SDK applies default masking rules for common sensitive headers, query parameters and request/response body fields.The Request logs dashboard now shows individual requests handled by your application. You can filter, search, and inspect them in detail.