-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Feature
1 / 21 of 2 issues completed
Copy link
Labels
Component: CoreRelates to core serviceRelates to core serviceComponent: FoxxFoxx Arango micro services.Foxx Arango micro services.Priority: LowLower priority work.Lower priority work.
Description
The following needs to be added to dbGet, dbPost, and dbGetRaw
struct curl_slist* headers = nullptr;
// safe: curl_slist_append copies the string internally
headers = curl_slist_append(headers, (std::string("x-correlation-id: ") + log_context.correlation_id).c_str());
// attach headers to the CURL handle
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
Then after the curl perform call
curl_slist_free_all(headers);
There are several functions where you will need to generate the correlation-id-x from scratch in the core server.
i.e.
in CoreServer
db.notePurge is called in dbMaintenance.
serverPing is called in waitForDB
db.metricsPurge in metricsThread
db.metricsUpdateMsgCounts in metricsThread
in TaskMgr
db.taskLoadReady in initialize
db.taskPurge in purgeTaskHistory
in AuthMap
db.uidByPubKey in hasKey
db.uidByPubKey in getUIDSafe
Can generate a UUID from scratch in C++ using boost.
#include <boost/uuid/uuid.hpp> // uuid class
#include <boost/uuid/uuid_generators.hpp> // generators
#include <boost/uuid/uuid_io.hpp> // streaming operators
#include <iostream>
int main() {
// Create a random UUID generator
boost::uuids::random_generator generator;
// Generate a UUIDv4
boost::uuids::uuid uuid = generator();
// Print it
std::cout << "UUIDv4: " << uuid << std::endl;
return 0;
}
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
Component: CoreRelates to core serviceRelates to core serviceComponent: FoxxFoxx Arango micro services.Foxx Arango micro services.Priority: LowLower priority work.Lower priority work.