Skip to content

upgrade thanos from v0.39.2 to v0.41.0,trace-id loss. #8760

@zdyj3170101136

Description

@zdyj3170101136

in v0.39.2, the thanos query frontend slow log would print trace-id。

but after upgraded to v0.41.0, the trace-id is lossed。

v0.39.2 extract trace-id code:

	hs := w.Header()
	for h, vs := range resp.Header {
		hs[h] = vs
	}
	// ...
	if shouldReportSlowQuery {
		f.reportSlowQuery(r, hs, queryString, queryResponseTime, stats)
	}

v0.41.0 extrace trace-id code:

		if shouldReportSlowQuery {
			var responseHeaders http.Header
			if resp != nil {
				responseHeaders = resp.Header
			}
			f.reportSlowQuery(r, responseHeaders, queryString, queryResponseTime, stats)
		}

the header is different, i think this is why we lose the trace-id。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions