Skip to content

Commit fe58d36

Browse files
AnnatarHeclaude
andcommitted
refactor(otel): remove unused SendCCSessionEnd function and types
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0f3ce11 commit fe58d36

2 files changed

Lines changed: 0 additions & 47 deletions

File tree

model/api_ccotel.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,3 @@ func SendCCOtelData(ctx context.Context, req *CCOtelRequest, endpoint Endpoint)
2929

3030
return &resp, nil
3131
}
32-
33-
// SendCCSessionEnd notifies the backend that a session has ended
34-
// POST /api/v1/cc/session/end
35-
func SendCCSessionEnd(ctx context.Context, req *CCSessionEndRequest, endpoint Endpoint) error {
36-
ctx, span := modelTracer.Start(ctx, "ccotel.session.end")
37-
defer span.End()
38-
39-
var resp CCSessionEndResponse
40-
err := SendHTTPRequestJSON(HTTPRequestOptions[*CCSessionEndRequest, CCSessionEndResponse]{
41-
Context: ctx,
42-
Endpoint: endpoint,
43-
Method: http.MethodPost,
44-
Path: "/api/v1/cc/session/end",
45-
Payload: req,
46-
Response: &resp,
47-
Timeout: 30 * time.Second,
48-
})
49-
50-
return err
51-
}

model/ccotel_types.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,33 +84,6 @@ type CCOtelResponse struct {
8484
Message string `json:"message,omitempty"`
8585
}
8686

87-
// CCSessionEndRequest is the request to POST /api/v1/cc/session/end
88-
type CCSessionEndRequest struct {
89-
Host string `json:"host"`
90-
SessionID string `json:"sessionId"`
91-
EndedAt int64 `json:"endedAt"`
92-
ActiveTimeSeconds int `json:"activeTimeSeconds,omitempty"`
93-
TotalPrompts int `json:"totalPrompts,omitempty"`
94-
TotalToolCalls int `json:"totalToolCalls,omitempty"`
95-
TotalApiRequests int `json:"totalApiRequests,omitempty"`
96-
TotalCostUSD float64 `json:"totalCostUsd,omitempty"`
97-
LinesAdded int `json:"linesAdded,omitempty"`
98-
LinesRemoved int `json:"linesRemoved,omitempty"`
99-
CommitsCreated int `json:"commitsCreated,omitempty"`
100-
PRsCreated int `json:"prsCreated,omitempty"`
101-
TotalInputTokens int64 `json:"totalInputTokens,omitempty"`
102-
TotalOutputTokens int64 `json:"totalOutputTokens,omitempty"`
103-
TotalCacheReadTokens int64 `json:"totalCacheReadTokens,omitempty"`
104-
TotalCacheCreationTokens int64 `json:"totalCacheCreationTokens,omitempty"`
105-
}
106-
107-
// CCSessionEndResponse is the response from POST /api/v1/cc/session/end
108-
type CCSessionEndResponse struct {
109-
Code int `json:"code"`
110-
Data interface{} `json:"data"`
111-
Message string `json:"message"`
112-
}
113-
11487
// Claude Code OTEL metric types
11588
const (
11689
CCMetricSessionCount = "session_count"

0 commit comments

Comments
 (0)