@blaxel/telemetry

中文文档
0.3.37发布于 2026/11/11MITTypeScriptESM + CJS近 30 天下载 4.3万

Blaxel SDK for TypeScript

原始使用文档
文档目录6 节
  1. Installation
  2. Authentication
  3. Usage
  4. Requirements
  5. Contributing
  6. License

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/telemetry

Authentication

The SDK authenticates with your Blaxel workspace using these sources (in priority order):

  1. Blaxel CLI, when logged in
  2. Environment variables in .env file (BL_WORKSPACE, BL_API_KEY)
  3. System environment variables
  4. 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-WORKSPACE

This 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.

版本与发布记录

@blaxel/telemetry 共发布 690 个版本,首次发布于 2025/05/04;过去 12 个月发布了 341 个版本。

版本发布日期距今
0.3.37latest2026/11/11今天
0.3.37-preview.356preview2026/11/11今天
0.3.37-preview.3552026/11/101 天前
0.3.37-preview.3542026/11/101 天前
0.3.37-preview.3532026/11/101 天前
0.3.37-preview.3522026/11/101 天前

其他发布通道:dev → 0.3.18-dev.283,preview → 0.3.37-preview.356。

关于 @blaxel/telemetry 的常见问题

@blaxel/telemetry 是什么?

Blaxel SDK for TypeScript

如何安装 @blaxel/telemetry?

在项目目录运行 npm install @blaxel/telemetry,或使用 pnpm add / yarn add / bun add。

@blaxel/telemetry 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@blaxel/telemetry 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@blaxel/telemetry 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@blaxel/telemetry 可以商用吗?

@blaxel/telemetry 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@blaxel/telemetry 的下载量有多少?

根据 npm 官方下载统计,@blaxel/telemetry 在 2026/10/09 – 2026/11/07 这 30 天内被下载 43,328 次,日均约 1,444 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@blaxel/telemetry 还在维护吗?

最新版本 0.3.37 发布于 2026/11/11(今天);至今共发布 690 个版本,其中过去 12 个月发布了 341 个;首次发布于 2025/05/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。