MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / startMonitoringSpan

Method startMonitoringSpan

imagedata/factory.go:247–261  ·  view source on GitHub ↗
(
	ctx context.Context,
	imageURL, desc string,
)

Source from the content-addressed store, hash-verified

245}
246
247func (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}

Callers 2

DownloadSyncMethod · 0.95
DownloadAsyncMethod · 0.95

Calls 3

MetaKeyFunction · 0.92
MetaURLOriginFunction · 0.92
StartSpanMethod · 0.65

Tested by

no test coverage detected