Skip to content

[bot] Add embeddings instrumentation for OpenAI (openai-go) #76

@AbhiPrasad

Description

Summary

Split from #58.

trace/contrib/openai traces /v1/chat/completions and /v1/responses, but it does not route /v1/embeddings. Calls made through the official openai-go client via client.Embeddings.New() therefore fall through without emitting Braintrust spans.

What is missing

  • Route /v1/embeddings in trace/contrib/openai/traceopenai.go
  • Add an embeddings tracer that records model, input, usage/token metrics, and response metadata as a Braintrust llm span
  • Add tests covering embeddings path matching and traced embeddings requests

Upstream surface

Local repo files inspected

  • trace/contrib/openai/traceopenai.go
  • trace/internal/utils_test.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions