in elastictransport/instrumentation.go [203:217]
func (i ElasticsearchOpenTelemetry) AfterResponse(ctx context.Context, res *http.Response) {
span := trace.SpanFromContext(ctx)
if span.IsRecording() {
if id := res.Header.Get("X-Found-Handling-Cluster"); id != "" {
span.SetAttributes(
attribute.String(attrDbElasticsearchClusterName, id),
)
}
if name := res.Header.Get("X-Found-Handling-Instance"); name != "" {
span.SetAttributes(
attribute.String(attrDbElasticsearchNodeName, name),
)
}
}
}