( ctx context.Context, imageURL, desc string, )
| 245 | } |
| 246 | |
| 247 | func (f *Factory) startMonitoringSpan( |
| 248 | ctx context.Context, |
| 249 | imageURL, desc string, |
| 250 | ) (context.Context, context.CancelFunc) { |
| 251 | if f.monitoring == nil { |
| 252 | return ctx, func() {} |
| 253 | } |
| 254 | |
| 255 | meta := monitoring.Meta{ |
| 256 | monitoring.MetaKey(desc + " URL"): imageURL, |
| 257 | monitoring.MetaKey(desc + " Origin"): monitoring.MetaURLOrigin(imageURL), |
| 258 | } |
| 259 | |
| 260 | return f.monitoring.StartSpan(ctx, "Downloading "+desc, meta) |
| 261 | } |
no test coverage detected