()
| 284 | } |
| 285 | |
| 286 | func (r *remoteReporter) reportWithDeployment() { |
| 287 | // Submit deployment information before creating a snapshot! |
| 288 | // This is separated from the snapshot API call to reduce |
| 289 | // duplicate data from being inserted. Snapshot may be called |
| 290 | // numerous times simultaneously if there is lots of activity! |
| 291 | err := r.deployment() |
| 292 | if err != nil { |
| 293 | r.options.Logger.Debug(r.ctx, "update deployment", slog.Error(err)) |
| 294 | return |
| 295 | } |
| 296 | snapshot, err := r.createSnapshot() |
| 297 | if errors.Is(err, context.Canceled) { |
| 298 | return |
| 299 | } |
| 300 | if err != nil { |
| 301 | r.options.Logger.Error(r.ctx, "unable to create deployment snapshot", slog.Error(err)) |
| 302 | return |
| 303 | } |
| 304 | r.reportSync(snapshot) |
| 305 | } |
| 306 | |
| 307 | // deployment collects host information and reports it to the telemetry server. |
| 308 | func (r *remoteReporter) deployment() error { |
no test coverage detected