Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[bot] Azure AI Inference SDK (`@azure-rest/ai-inference`) not instrumented — no tracing for Azure AI Foundry model execution (63,908 weekly downloads)

未关闭
#2,073 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
azure, typescript

调研方向

首先阅读 js/src/auto-instrumentations/configs/ 中现有的配置,尤其是 openai.ts,以及 js/src/auto-instrumentations/configs/all.ts 中的注册信息。然后检查 e2e/scenarios/ 和列出的 Azure SDK 接口;当通过 @azure-rest/ai-inference 的 chat completions、streaming 和 embeddings 具备带测试的 tracing 覆盖率时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Summary

Microsoft publishes a dedicated TypeScript SDK for Azure AI model inference: @azure-rest/ai-inference (part of the Azure SDK for JavaScript). It provides execution APIs for chat completions, streaming, and embeddings for models hosted on Azure AI Foundry (Phi, Mistral, Meta Llama, and others). This package uses a path-based REST client pattern that is architecturally distinct from the openai npm package and is not covered by any existing instrumentation. Users who call @azure-rest/ai-inference directly get no Braintrust spans.

What instrumentation is missing

The @azure-rest/ai-inference package exposes these execution surfaces, none of which are instrumented:

SDK Method Description
client.path("/chat/completions").post({ body: { messages, ... } }) Chat completions for hosted models
.post({ body: { ..., stream: true } }).asNodeStream() Streaming chat completions
client.path("/embeddings").post({ body: { input, model } }) Text embeddings

Users instantiate it as:

import ModelClient from "@azure-rest/ai-inference";
import { AzureKeyCredential } from "@azure/core-auth";

const client = ModelClient(endpoint, new AzureKeyCredential(apiKey));

const response = await client.path("/chat/completions").post({
  body: {
    messages: [{ role: "user", content: "Hello" }],
    model: "Phi-4",
  },
});

Auto-instrumentation gap:

The @azure-rest/ai-inference SDK uses a path-based REST client architecture (from @azure/core-rest-pipeline) that is fundamentally different from the openai package's class-method structure. None of the existing configs in js/src/auto-instrumentations/configs/ target any @azure-rest/* module paths. The existing openai instrumentation targets openai module file paths and does not fire for calls made through @azure-rest/ai-inference.

No coverage in any instrumentation layer:

  • No auto-instrumentation config for @azure-rest/ai-inference in js/src/auto-instrumentations/configs/
  • No wrapper function (e.g. wrapAzureAIInference())
  • No channels or plugin for Azure AI Inference methods in js/src/instrumentation/plugins/
  • No e2e test scenarios
  • Grep for azure-rest, @azure, or ai-inference across js/src/ returns zero matches

Braintrust docs status

unclear — The Braintrust integrations page at https://www.braintrust.dev/docs/integrations lists "Azure AI Foundry" as a supported provider, but the JavaScript SDK documentation does not describe any direct instrumentation for the @azure-rest/ai-inference package.

Upstream references

Local files inspected

  • js/src/auto-instrumentations/configs/ — full config list: anthropic.ts, openai.ts, ai-sdk.ts, groq.ts, mistral.ts, cohere.ts, huggingface.ts, google-genai.ts, google-adk.ts, genkit.ts, openai-agents.ts, openrouter.ts, openrouter-agent.ts, claude-agent-sdk.ts, cursor-sdk.ts, github-copilot.ts, openai-codex.ts, flue.ts — no Azure AI Inference config present
  • js/src/auto-instrumentations/configs/all.ts — @azure-rest/ai-inference not listed among any instrumentation groups
  • Full repo grep for azure-rest, @azure, ai-inference in js/src/ — zero matches
  • e2e/scenarios/ — no Azure AI Inference test scenarios
主要语言
TypeScript
星标
29
派生
16
平均合并
1 天 19 小时
30 天内合并 PR
69

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

braintrustdata/braintrust-sdk-javascript 的其他 Issue

查看 braintrustdata/braintrust-sdk-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。