in elastictransport/instrumentation.go [119:139]
func (i ElasticsearchOpenTelemetry) shouldRecordRequestBody(endpoint string) bool {
// allow list of endpoints that will propagate query to OpenTelemetry.
// see https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/#call-level-attributes
var searchEndpoints = map[string]struct{}{
"search": {},
"async_search.submit": {},
"msearch": {},
"eql.search": {},
"terms_enum": {},
"search_template": {},
"msearch_template": {},
"render_search_template": {},
}
if i.recordBody {
if _, ok := searchEndpoints[endpoint]; ok {
return true
}
}
return false
}