[PR #9401] [CLOSED] Add support for exporting opentelemetry trace spans (ollama#9254) #38820

Closed
opened 2026-04-22 23:28:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9401
Author: @ibl-g
Created: 2/27/2025
Status: Closed

Base: mainHead: main


📝 Commits (7)

  • 1905479 server: Support opentelemetry trace span export (ollama#9254)
  • 5fcbcbb docs: Add opentelemetry tracing docs (ollama#9254)
  • d8bb961 server: Add trace spans for model loading and eval (ollama#9254)
  • 3af5485 go.mod: add dependencies for opentelemetry trace export (ollama#9254)
  • c9d3dff Merge recent changes after resolving conflicts
  • df97c65 go mod tidy
  • 121d9ae server: sync tracing test with recent changes to routes (ollama#9254)

📊 Changes

6 files changed (+382 additions, -44 deletions)

View changed files

docs/tracing.md (+19 -0)
📝 go.mod (+49 -13)
📝 go.sum (+107 -31)
📝 server/routes.go (+24 -0)
server/tracing.go (+32 -0)
server/tracing_test.go (+151 -0)

📄 Description

It is implemented per description in https://github.com/ollama/ollama/issues/9254

Note that it adds dependencies on opentelemetry-go and opentelemetry-go-contrib. Notably the latter does most of the heavy lifting for capturing trace spans (otelgin) and exporting them via a set of configurable exporters (autoexport).

I'm not very familiar with go.mod and go.sum so please let me know if I messed them up by using "go mod tidy".

Please let me know if there's anything I can do to assist with the review.

Thanks!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/9401 **Author:** [@ibl-g](https://github.com/ibl-g) **Created:** 2/27/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`1905479`](https://github.com/ollama/ollama/commit/1905479f889a3ace30a3e2145616d3327e46f533) server: Support opentelemetry trace span export (ollama#9254) - [`5fcbcbb`](https://github.com/ollama/ollama/commit/5fcbcbb85692df0b724c8e49f0277172329e4d5f) docs: Add opentelemetry tracing docs (ollama#9254) - [`d8bb961`](https://github.com/ollama/ollama/commit/d8bb961e579cdde2f637a0abf2522abe1c1cb1d7) server: Add trace spans for model loading and eval (ollama#9254) - [`3af5485`](https://github.com/ollama/ollama/commit/3af548580361254a6412f7099568f4261d852ee1) go.mod: add dependencies for opentelemetry trace export (ollama#9254) - [`c9d3dff`](https://github.com/ollama/ollama/commit/c9d3dffc837c70e5ea55e24eb78f5ea2d5cdf3f4) Merge recent changes after resolving conflicts - [`df97c65`](https://github.com/ollama/ollama/commit/df97c65f30756c8264a53473febafce004173262) go mod tidy - [`121d9ae`](https://github.com/ollama/ollama/commit/121d9aea4484ed039834b5a9941658f4075ec3b1) server: sync tracing test with recent changes to routes (ollama#9254) ### 📊 Changes **6 files changed** (+382 additions, -44 deletions) <details> <summary>View changed files</summary> ➕ `docs/tracing.md` (+19 -0) 📝 `go.mod` (+49 -13) 📝 `go.sum` (+107 -31) 📝 `server/routes.go` (+24 -0) ➕ `server/tracing.go` (+32 -0) ➕ `server/tracing_test.go` (+151 -0) </details> ### 📄 Description It is implemented per description in https://github.com/ollama/ollama/issues/9254 Note that it adds dependencies on opentelemetry-go and opentelemetry-go-contrib. Notably the latter does most of the heavy lifting for capturing trace spans (otelgin) and exporting them via a set of configurable exporters (autoexport). I'm not very familiar with go.mod and go.sum so please let me know if I messed them up by using "go mod tidy". Please let me know if there's anything I can do to assist with the review. Thanks! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 23:28:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#38820