(ctx context.Context, sessID, clientID string)
| 2163 | } |
| 2164 | |
| 2165 | func (srv *Server) ClientTelemetry(ctx context.Context, sessID, clientID string) (*clientdb.DB, error) { |
| 2166 | client, err := srv.clientFromIDs(sessID, clientID) |
| 2167 | if err != nil { |
| 2168 | return nil, err |
| 2169 | } |
| 2170 | // Flush ALL clients in the session, not just the requested one. |
| 2171 | // Spans from nested clients may still be buffered in their |
| 2172 | // BatchSpanProcessor. A session-wide flush ensures the span tree |
| 2173 | // is complete before captureLogs walks it via SelectLogsBeneathSpan. |
| 2174 | if err := client.daggerSession.FlushTelemetry(ctx); err != nil { |
| 2175 | return nil, fmt.Errorf("flush telemetry: %w", err) |
| 2176 | } |
| 2177 | return client.TelemetryDB(ctx) |
| 2178 | } |
| 2179 | |
| 2180 | // Return a client connected to a cloud engine. If bool return is false, the local engine should be used. Session attachables for the returned client will be proxied back to the calling client. |
| 2181 | func (srv *Server) CloudEngineClient( |
nothing calls this directly
no test coverage detected