Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* [CHANGE] metrics-generator: Changed added metric label `instance` to `__metrics_gen_instance` to reduce collisions with custom dimensions. [#1439](https://github.com/grafana/tempo/pull/1439) (@joe-elliott)
* [FEATURE] metrics-generator: support per-tenant processor configuration [#1434](https://github.com/grafana/tempo/pull/1434) (@kvrhdn)
* [ENHANCEMENT] Added the ability to have a per tenant max search duration. [#1421](https://github.com/grafana/tempo/pull/1421) (@joe-elliott)
* [BUGFIX] Fix nil pointer panic when the trace by id path errors. [1441](https://github.com/grafana/tempo/pull/1441) (@joe-elliott)

## v1.4.1 / 2022-05-05

Expand Down
6 changes: 4 additions & 2 deletions modules/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@ func newTraceByIDMiddleware(cfg Config, logger log.Logger) Middleware {
}
resp.Body = io.NopCloser(bytes.NewReader(traceBuffer))
}

if resp.Header != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The containing if statement also checks for http status OK. Does the header need to be set for errors as well? I'm honestly unsure.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think this is better. Our errors tend to be just text so we probably shouldn't be setting the Content-Type header.

resp.Header.Set(api.HeaderContentType, marshallingFormat)
}
}
span := opentracing.SpanFromContext(r.Context())
if span != nil {
span.SetTag("contentType", marshallingFormat)
}

resp.Header.Set(api.HeaderContentType, marshallingFormat)

return resp, err
})
})
Expand Down