Honeycomb MCP 服务器是一款中间件解决方案,用于与 Honeycomb 平台进行交互。它提供了一系列 API 端点,可帮助用户创建、查询和管理 Honeycomb 数据集,极大地提升了数据处理和管理的效率。
Honeycomb MCP 服务器的安装与配置十分简便,以下是具体步骤:
git clone https://github.com/your-username/honeycomb-mcp-server.git
npm install
node index.js
// 请求示例
POST /api/datasets
{
"name": "Application Monitoring",
"description": "Monitoring for our production application"
}
// 响应示例
{
"dataset": {
"id": "60a3c5d94b16f00079b4c8d2",
"name": "Application Monitoring",
"description": "Monitoring for our production application",
"created_at": "2025-03-25T14:30:00Z"
}
}
// 请求示例
GET /api/datasets/{datasetId}/events?from=2025-03-25T14%3A30%3A00Z&to=2025-03-26T14%3A30%3A00Z
// 响应示例
{
"events": [
{
"id": "1",
"data": {
"service": "api-server",
"message": "User login successful",
"duration_ms": 45,
"status_code": 200,
"endpoint": "/api/login",
"timestamp": "2025-03-25T14:30:00Z"
}
}
]
}
所有事件数据必须符合以下结构:
{
"id": string,
"data": {
// 自定义字段
},
"timestamp": string // ISO 格式时间字符串
}
支持的查询操作符包括 =, !=, >, <, >=, <=, IN, NOT IN。您还可以组合多个条件使用逻辑运算符 AND 和 OR。
当出现错误时,服务器会返回统一格式的错误信息:
{
"error": {
"message": "Detailed error description",
"code": "ERROR_CODE"
}
}
| 错误代码 | 详情 |
|---|---|
| BAD_REQUEST | 请求参数无效。 |
| NOT_FOUND | 资源不存在。 |
| INTERNAL_SERVER_ERROR | 服务器内部错误。 |
git clone https://github.com/your-username/honeycomb-mcp-server.git
npm install
npm run dev
此项目遵循 MIT 许可证。请查看 LICENSE 文件获取详细信息。