MCPcopy Create free account
hub / github.com/dagger/dagger / ClientTelemetry

Method ClientTelemetry

engine/server/session.go:2165–2178  ·  view source on GitHub ↗
(ctx context.Context, sessID, clientID string)

Source from the content-addressed store, hash-verified

2163}
2164
2165func (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.
2181func (srv *Server) CloudEngineClient(

Callers

nothing calls this directly

Calls 3

clientFromIDsMethod · 0.95
TelemetryDBMethod · 0.80
FlushTelemetryMethod · 0.45

Tested by

no test coverage detected