curl --request POST \
--url https://api.coval.dev/v1/traces \
--header 'Content-Type: application/x-protobuf' \
--header 'X-API-Key: <api-key>' \
--data '<string>'import requests
url = "https://api.coval.dev/v1/traces"
payload = "<string>"
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/x-protobuf"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/x-protobuf'},
body: '<string>'
};
fetch('https://api.coval.dev/v1/traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-protobuf",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/traces"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/x-protobuf")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coval.dev/v1/traces")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/x-protobuf")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/x-protobuf'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"status": "ok",
"simulation_output_id": "a1b2c3d4"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Missing required header: X-Simulation-Id or X-Conversation-Id",
"details": [
{
"field": "X-Simulation-Id",
"description": "Provide either X-Simulation-Id or X-Conversation-Id"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "API key lacks the traces:write scope"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Simulation output not found",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Service temporarily unavailable",
"details": [
{
"description": "Database routing is temporarily unavailable. Please retry."
}
]
}
}Ingest OTLP traces
Ingest OpenTelemetry trace data and associate it with a simulation output or an uploaded conversation.
The request body must be a standard OTLP ExportTraceServiceRequest,
in protobuf binary (application/x-protobuf, the default for stock
OTLP HTTP exporters) or JSON (application/json) format. See the
OTLP/HTTP specification
and opentelemetry-proto
for the wire format.
Identify the target by providing exactly one of X-Simulation-Id or
X-Conversation-Id (not both).
curl --request POST \
--url https://api.coval.dev/v1/traces \
--header 'Content-Type: application/x-protobuf' \
--header 'X-API-Key: <api-key>' \
--data '<string>'import requests
url = "https://api.coval.dev/v1/traces"
payload = "<string>"
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/x-protobuf"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/x-protobuf'},
body: '<string>'
};
fetch('https://api.coval.dev/v1/traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-protobuf",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/traces"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/x-protobuf")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coval.dev/v1/traces")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/x-protobuf")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/x-protobuf'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"status": "ok",
"simulation_output_id": "a1b2c3d4"
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Missing required header: X-Simulation-Id or X-Conversation-Id",
"details": [
{
"field": "X-Simulation-Id",
"description": "Provide either X-Simulation-Id or X-Conversation-Id"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "API key lacks the traces:write scope"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Simulation output not found",
"details": [
{
"field": "X-Simulation-Id",
"description": "No simulation output found with this ID"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Service temporarily unavailable",
"details": [
{
"description": "Database routing is temporarily unavailable. Please retry."
}
]
}
}Authorizations
Organization API key for authentication
Headers
Simulation output ID to associate the spans with. Use for
simulation-based flows. Mutually exclusive with X-Conversation-Id.
Conversation ID returned by POST /v1/conversations/uploaded:submit.
Use for uploaded conversation flows. Mutually exclusive with X-Simulation-Id.
Body
OTLP ExportTraceServiceRequest payload — protobuf or JSON.
OTLP/HTTP protobuf-encoded ExportTraceServiceRequest. This
is the default content type emitted by the OpenTelemetry HTTP
exporter (opentelemetry-exporter-otlp-proto-http).
Was this page helpful?