chore: rename service -> coder_service, remove agent_id label (#19241)

Pyroscope uses `service` tag for top level distinction. So move our
`service` -> `coder_service`
This commit is contained in:
Steven Masley
2025-08-07 13:58:39 -05:00
committed by GitHub
parent b8851f03e3
commit 34c46c0748
4 changed files with 40 additions and 14 deletions
+9 -1
View File
@@ -14,12 +14,14 @@ import (
"net/url"
"path/filepath"
"regexp"
"runtime/pprof"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/coder/coder/v2/coderd/oauth2provider"
"github.com/coder/coder/v2/coderd/pproflabel"
"github.com/coder/coder/v2/coderd/prebuilds"
"github.com/coder/coder/v2/coderd/wsbuilder"
@@ -1340,7 +1342,13 @@ func New(options *Options) *API {
).Get("/connection", api.workspaceAgentConnectionGeneric)
r.Route("/me", func(r chi.Router) {
r.Use(workspaceAgentInfo)
r.Get("/rpc", api.workspaceAgentRPC)
r.Group(func(r chi.Router) {
r.Use(
// Override the request_type for agent rpc traffic.
httpmw.WithStaticProfilingLabels(pprof.Labels(pproflabel.RequestTypeTag, "agent-rpc")),
)
r.Get("/rpc", api.workspaceAgentRPC)
})
r.Patch("/logs", api.patchWorkspaceAgentLogs)
r.Patch("/app-status", api.patchWorkspaceAgentAppStatus)
// Deprecated: Required to support legacy agents