const response = await fetch('https://cloud-api.calyptia.com/v1/pipelines/{pipelineID}/trace_session/records', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"type": 1,
"trace_id": "trace.5",
"start_time": 1658953439,
"end_time": 1658953439,
"plugin_instance": "nest.2",
"plugin_alias": "nest_2",
"records": [
{
"timestamp": 1658953439,
"record": "{\n \"dummy\": \"dummy_0\",\n \"powered_by\": \"calyptia\",\n \"data\": {\n \"key_name\": \"foo\",\n \"key_cnt\": \"1\"\n }\n}"
}
]
}),
});
const data = await response.json();