@blaxel/telemetry
v0.2.71
Published
Blaxel SDK for TypeScript
Readme
Blaxel TypeScript SDK
Blaxel is a perpetual sandbox platform that achieves near instant latency by keeping infinite secure sandboxes on automatic standby, while co-hosting your agent logic to cut network overhead.
This package contains helper functions for Blaxel's TypeScript SDK, to enable integrated telemetry.
Traces are automatically sampled at 10%, and can be retrieved from the Blaxel Console.
Installation
# npm
npm install @blaxel/telemetry
# yarn
yarn add @blaxel/telemetry
# bun
bun add @blaxel/telemetryAuthentication
The SDK authenticates with your Blaxel workspace using these sources (in priority order):
- Blaxel CLI, when logged in
- Environment variables in
.envfile (BL_WORKSPACE,BL_API_KEY) - System environment variables
- Blaxel configuration file (
~/.blaxel/config.yaml)
When developing locally, the recommended method is to just log in to your workspace with the Blaxel CLI:
bl login YOUR-WORKSPACEThis allows you to run Blaxel SDK functions that will automatically connect to your workspace without additional setup. When you deploy on Blaxel, this connection persists automatically.
When running Blaxel SDK from a remote server that is not Blaxel-hosted, we recommend using environment variables as described in the third option above.
Usage
Enable automatic telemetry by importing the @blaxel/telemetry package:
import "@blaxel/telemetry";Requirements
- Node.js v18 or later
Contributing
Contributions are welcome! Please feel free to submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
