Osuite instumentation agent integrates with your IDE and automatically instruments your code. You can specify your requirements and the agent will install the necessary dependencies and instruments your code.
Prerequisites
- An Osuite Cloud account
- Your Osuite API key
Step 1: Create your API key
An API key allows your agents to interact with Osuite. You can create a new API key in the Osuite UI under Settings > API Keys.
Step 2: Install Osuite cli
npm install @osuite/cli -g && osuite setup-skills
Step 3: Add your API key to the cli
Add the following line to your shell profle.
export OSUITE_API_ENDPOINT=https://api.<region>.osuite.io
export OSUITE_API_KEY=<your api key>
Run osuite whoami to verify that you are authenticated.
Step 4: Go to your AI IDE (cursor, antigravity, etc.) and instument your code
Once you have opened your code, just prompt the agent to instument your code to send traces and logs to Osuite. Here is an example prompt:
Instrument my code to send traces and logs to Osuite. Instument the database and kafka clients.
Step 5: Verify your code is instrumented
You need to make sure you have these environment variables set connectly.
OTEL_SERVICE_NAME="my-service"
OTEL_EXPORTER_OTLP_ENDPOINT="ingest.<region>.osuite.io:443"
OTEL_EXPORTER_OTLP_HEADERS="x-osuite-ingest-token=<your ingest token>"
OTEL_RESOURCE_ATTRIBUTES="service.environment=dev"
Note:
service.environmentis required by Osuite to group traces by environment.
Step 6: Start your application
Start your application and make sure you see traces and logs in Osuite.
Step 7: Verify dataflow
You can verify your code is instrumented by checking the Osuite UI. You should see traces and logs flowing in.
Troubleshooting
If you are not seeing traces and logs in Osuite, you can check the following:
- Make sure you have the correct environment variables set
- Make sure you have the correct ingest token set
- Make sure you have the correct OTLP endpoint set