Tutorial Intro
Let's discover Nexitor in less than 5 minutes.
Getting Started
We assume you have bought a Nexitor subscription and your instance is already running. For Nexitor to work as expected you will need to feed logs via HTTP with your tokens to Nexitor. We are going to explain that in further detail.
What you'll need
- Nexitor instance running
- Any Code, Server or Tool that can send HTTP Post requests
Copy your Token
Tokens are only used to send logs, you may use them in your backend systems but you can also use them in Frontend. Though it is recommended to create new ones for Frontend as they are more likely to be misused by others.
- Inside your Nexitor Instance click on settings
- Copy the already existing Token or create a new one if you wish
Send your first Log
See the example below of a generic HTTP post request you can use to send logs:
axios.post('https://your-instance.nexitor.io/log', {
status: '200',
title: 'GET - /user',
user_name: 'Alice Brown',
user_identifier: 'c9cdbd17-9b44-4fbb-8199-d6bc7d6c2a1a',
user_ip: '127.0.0.1',
message: 'My first log',
payload: '{maxAge: 56}',
stacktrace: 'Test Stacktrace',
application: 'Nexitor',
instance: 'Staging'
}, {
headers: {
Authorization: `Bearer ${token}`
}
})
After this you should see your log pop up on your Nexitor instance.
We are working on providing modules and packages that will automate the logging process for popular frameworks. We are also looking into supporting OpenTelemetry standards.
Log attributes
Attribute | Optional | Default | Description |
---|---|---|---|
status | Yes | "Log" | HTTP Status or other meaningful status identifier such as ERROR, SUCCESS |
instance | Yes | "Development" | Name of the instance |
application | Yes | "Nexitor" | Name of the application |
title | No | "-" | Title of the Log will be displayed on the uncollapsed log |
user_name | Yes | "-" | Name of the user that initiated the transaction |
user_identifier | Yes | "-" | Unique identifier of the user |
user_ip | Yes | "0.0.0.0" | IP of the user that initiated the transaction |
message | Yes | "-" | Further description of the log |
payload | Yes | "-" | Payload data |
stacktrace | Yes | "-" | Error description |