Headers
Complete reference for all headers supported by Proxy, including required headers, optional trace headers, and optional span headers.Required Headers
These headers must be included with every request to Proxy.Your Adaline workspace API key for authentication.Validation: Must be a non-empty string and a valid Adaline API key.Usage: Required with every request for authentication.
Your Adaline project identifier to associate telemetry data.Validation: Must be a non-empty string and a valid project ID that your API key has access to.Usage: Required with every request to identify the project to create the trace.
Your Adaline prompt identifier for tracking specific prompts.Validation: Must be a non-empty string and a valid prompt ID within your project.Usage: Required with every request to identify the prompt to create the span.
Optional Trace Headers
These headers provide additional context for trace-level observability and monitoring.Custom name for the trace to help identify it in the Adaline.Validation: Must be a string if provided.Usage: Optional. Used for organizing and filtering traces in the Adaline.Default: Proxy
Status of the trace execution.Validation: Must be one of: “success”, “failure”, “pending”, “unknown”.Usage: Optional. Used for tracking trace completion status.Default: Adaline will set the status based on the response from the AI provider.
External reference ID to correlate with your application’s tracking systems and group different spans into a single trace.Validation: Must be a string if provided.Usage: Optional. Used for correlating traces with external systems. If not provided, each span will be a separate trace in Adaline.
Session identifier to group related traces together.Validation: Must be a string if provided.Usage: Optional. Used for filter and grouping traces within a session of your application.
JSON object containing custom attributes for the trace.Validation: Must be a valid JSON string if provided.Usage: Optional. Used for adding custom metadata to traces.
Each attribute operation must specify an operation type: “create” or “delete”.
To modify an existing attribute, use two operations: one to delete the existing attribute and one to create the new one in the same request.
You can mutate the attributes across multiple requests as long as they have the same ‘adaline-trace-reference-id’.
JSON array of tags for categorizing and filtering traces.Validation: Must be a valid JSON array if provided.Usage: Optional. Used for categorizing traces with searchable tags.
Each tag operation must specify an operation type: “create” or “delete”.
To modify an existing tag, use two operations: one to delete the existing tag and one to create the new one in the same request.
You can mutate the tags across multiple requests as long as they have the same ‘adaline-trace-reference-id’.
Optional Span Headers
These headers provide additional context for span-level observability within traces.Deployment identifier of the deployment in Adaline.Validation: Must be a string if provided.Usage: Optional. Used for correlating spans with specific deployments.
Custom name for the span to help identify it within a trace.Validation: Must be a string if provided.Usage: Optional. Used for organizing spans within traces.Default: External name of the type of request aka “Complete Chat” or “Stream Chat” or “Get Embeddings”
Boolean flag to indicate whether this span ‘output’ should be evaluated.Validation: Must be “true” or “false” if provided.Usage: Optional. Used for enabling/disabling evaluation on specific spans, overriding the continuous evaluation rate set in Adaline.Default: false
Session identifier to group related traces together.Validation: Must be a string if provided.Usage: Optional. Used for filter and grouping spans within a session of your application.
External reference ID to correlate this span with your application’s tracking.Validation: Must be a string if provided.Usage: Optional. Used for correlating spans with external systems.
JSON object containing variables used in this specific span.
Variables are dynamic values assigned to placeholders in your prompt, for eg. end user input, fetched context, session chat history, etc.
key
is the variable name and value
is the variable value of type ContentTypeValidation: Must be a valid JSON string if provided.Usage: Optional. Used for adding variables values to a dataset, playground, etc. in Adaline to iterate and evaluate on your prompt on.JSON object containing custom attributes for this span.Validation: Must be a valid JSON string if provided.Usage: Optional. Used for adding custom metadata to spans.
JSON array of tags for categorizing and filtering this span.Validation: Must be a valid JSON array if provided.Usage: Optional. Used for categorizing spans with searchable tags.
Header Usage Examples
Basic Request
Request with additional trace and span context
Best Practices
Organization
- Use ‘adaline-trace-reference-id’ to group related requests (aka spans) into a single trace to get a Gantt chart view in Adaline.
- Group related requests using session IDs to track all traces of a session in Adaline.
- Use trace and span reference IDs to correlate with your existing tracking systems.
Evaluations
- Use ‘adaline-span-run-evaluation’ to enable/disable evaluation on specific spans, overriding the continuous evaluation rate set in Adaline.
- Use ‘adaline-span-variables’ to add variables values to a dataset, playground, etc. in Adaline to iterate and evaluate on your prompt later on.
Debugging
- Include meaningful trace and span names for easier workflow identification in Adaline.
- Use attributes and tags to capture relevant context for troubleshooting.
Security
- Never log or expose your
adaline-api-key
in client-side code. - Store API keys securely using environment variables or secret management systems.