New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest API: Add an X-Opaque-Id
header, to be returned in the response if exists in the request
#1202
Comments
Hey, this would be sensational to use this ID as part of slf4j(log4j, logback) MDC concept (http://www.slf4j.org/manual.html#mdc). If all logs in Elasticsearch were tagged with this id coming from the client then one has fantastic log correlation across the cluster. |
that implies that all intra-cluster-node communication passes this header on as part of the requests too. |
Yep, and thats harder :) |
ahhh... come on.... "It's wafer thin.. "? :) This would be great for Google Dapper like retrospective analysis! |
BTW, is there anyway to set this header in the Java api when making a search request? I'd like to be able to set this header with our unique requestId on our app side, and then have the elasticsearch-jetty plugin log this (see sonian/elasticsearch-jetty#16). that way the logs on ES would have the requestID being passed across. |
@tallpsmith No, there isn't... |
if you had a pointer of an approximate location in the ES Code that could be tweaked to add this feature, I might get a pull request ready, but only if you think it's feasible to do (and you'd be happy to accept the idea)? |
@tallpsmith it makes sense, but adding it is a bit of a big task. The transport level APIs do not have the concept of metadata passing when executing an operation (or headers). So it needs to be added (in the most non intrusive manner as possible) and then used through the system. Requires some thinking on how best to do it... |
… if exists in the request, closes elastic#1202.
… if exists in the request, closes elastic#1202.
The
X-Opaque-Id
header, when provided on the request header, will be returned as a header in the response. This allows to track possibly track calls, or implement more efficient concurrent clients.The text was updated successfully, but these errors were encountered: