Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/traces/v1/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,20 @@ func NewV2Handler(read *url.URL, readTemplate string, tempo, writeOTLPHttp *url.

r.Group(func(r chi.Router) {
r.Use(c.tempoMiddlewares...)
r.Get("/tempo/ready", c.instrument.NewHandler(
prometheus.Labels{"group": "tracesv1api", "handler": "traces"},
tempoProxyRead))
r.Get("/tempo/api*", c.instrument.NewHandler(
prometheus.Labels{"group": "tracesv1api", "handler": "traces"},
tempoProxyRead))
// The MCP endpoint at /api/mcp uses JSON-RPC
r.Post("/tempo/api/mcp", c.instrument.NewHandler(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will these APIs be tenanted? (or even need to be tenanted?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the MCP endpoint is handled like a regular Tempo API endpoint.
It requires the X-Scope-OrgID header (specifying the tenant) to be set (if the Tempo instance has multi-tenancy enabled).

prometheus.Labels{"group": "tracesv1api", "handler": "traces"},
tempoProxyRead))
// HTTP DELETE is sent to terminate a MCP session
r.Delete("/tempo/api/mcp", c.instrument.NewHandler(
prometheus.Labels{"group": "tracesv1api", "handler": "traces"},
tempoProxyRead))
})
}

Expand Down