Commit d7dd089e authored by Jacob Vosmaer's avatar Jacob Vosmaer

Merge branch 'image-resizer-correlation-id' into 'master'

Pass CORRELATION_ID env variable to resize image subprocesses

See merge request gitlab-org/gitlab-workhorse!612
parents 7a99e1bf 71064f67
---
title: Pass CORRELATION_ID env variable to resize image subprocesses
merge_request: 612
author:
type: other
......@@ -46,6 +46,8 @@ const (
maxAllowedFileSizeBytes = 250 * 1000 // 250kB
)
var envInjector = tracing.NewEnvInjector()
// Images might be located remotely in object storage, in which case we need to stream
// it via http(s)
var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{
......@@ -251,6 +253,7 @@ func startResizeImageCommand(ctx context.Context, imageReader io.Reader, errorWr
"GL_RESIZE_IMAGE_WIDTH=" + strconv.Itoa(int(params.Width)),
"GL_RESIZE_IMAGE_CONTENT_TYPE=" + params.ContentType,
}
cmd.Env = envInjector(ctx, cmd.Env)
stdout, err := cmd.StdoutPipe()
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment