Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ec53d8d
Merge branch 'development' of github.com:Scale3-Labs/langtrace
karthikscale3 Nov 14, 2024
5f8719e
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Nov 19, 2024
603c2da
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Nov 21, 2024
6eed561
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Dec 13, 2024
e7fe260
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Jan 8, 2025
9fda818
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Feb 6, 2025
516fb87
Merge branch 'main' of github.com:Scale3-Labs/langtrace
karthikscale3 Mar 5, 2025
a554f8b
merge
karthikscale3 Mar 5, 2025
cbcdedd
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Mar 5, 2025
5a5ba27
Merge branch 'development' into release
karthikscale3 Mar 5, 2025
eede95e
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Mar 6, 2025
6a7c0a1
Merge branch 'development' into release
karthikscale3 Mar 6, 2025
f862b8f
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Mar 12, 2025
a02eb84
Merge branch 'development' into release
karthikscale3 Mar 12, 2025
3b5ae85
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Mar 26, 2025
6f3f226
Merge branch 'development' into release
karthikscale3 Mar 26, 2025
cb9cf3b
add cleanlab score (#428)
karthikscale3 Apr 17, 2025
16dc89d
merge
karthikscale3 Apr 17, 2025
1a99153
Merge branch 'development' into release
karthikscale3 Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,39 +69,6 @@ langtrace.init(api_key='<your_api_key>') # Get your API key at langtrace.ai

For detailed setup instructions, see [Getting Started](#-getting-started).

## ✨ Features

- 📊 **Open Telemetry Support**: Built on OTEL standards for comprehensive tracing
- 🔄 **Real-time Monitoring**: Track LLM API calls, vector operations, and framework usage
- 🎯 **Performance Insights**: Analyze latency, costs, and usage patterns
- 🔍 **Debug Tools**: Trace and debug your LLM application workflows
- 📈 **Analytics**: Get detailed metrics and visualizations
- 🏠 **Self-hosting Option**: Deploy on your own infrastructure

## 🚀 Quick Start

```bash
# For TypeScript/JavaScript
npm i @langtrase/typescript-sdk

# For Python
pip install langtrace-python-sdk
```

Initialize in your code:
```typescript
// TypeScript
import * as Langtrace from '@langtrase/typescript-sdk'
Langtrace.init({ api_key: '<your_api_key>' }) // Get your API key at langtrace.ai
```
```python
# Python
from langtrace_python_sdk import langtrace
langtrace.init(api_key='<your_api_key>') # Get your API key at langtrace.ai
```

For detailed setup instructions, see [Getting Started](#-getting-started).

## 📊 Open Telemetry Support

The traces generated by Langtrace adhere to [Open Telemetry Standards(OTEL)](https://opentelemetry.io/docs/concepts/signals/traces/). We are developing [semantic conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/) for the traces generated by this project. You can checkout the current definitions in [this repository](https://github.com/Scale3-Labs/langtrace-trace-attributes/tree/main/schemas). Note: This is an ongoing development and we encourage you to get involved and welcome your feedback.
Expand Down
1 change: 1 addition & 0 deletions components/project/traces/traces-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function TracesTable<TData, TValue>({
output_cost: newMode === "trace",
total_cost: newMode === "trace",
total_duration: newMode === "trace",
cleanlab_tlm_score: false,
});
if (newMode === "prompt") {
setFilters([
Expand Down
8 changes: 8 additions & 0 deletions components/project/traces/traces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ export default function Traces({ project_id }: TracesProps) {
);
},
},
{
accessorKey: "cleanlab_tlm_score",
header: "Cleanlab TLM Score",
cell: ({ row }) => {
const score = row.getValue("cleanlab_tlm_score") as number;
return <p className="text-xs font-semibold">{score}</p>;
},
},
{
accessorKey: "total_duration",
header: "Total Duration",
Expand Down
2 changes: 1 addition & 1 deletion components/shared/vendor-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ export function VendorLogo({
width={80}
height={80}
className={cn(
`${color} p-[3px]`,
`${color} p-[0.5px]`,
variant === "circular" ? "rounded-full" : "rounded-md"
)}
/>
Expand Down
11 changes: 11 additions & 0 deletions lib/trace_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface Trace {
sorted_trace: any[];
trace_hierarchy: any[];
raw_attributes: any;
cleanlab_tlm_score?: number;
}

interface TraceAttributes {
Expand Down Expand Up @@ -193,6 +194,7 @@ export function processTrace(trace: any): Trace {
const promptVersions: string[] = [];
const messages: Record<string, string[]>[] = [];
const allEvents: any[] = [];
let cleanlab_tlm_score: number | undefined;

let tokenCounts: any = {};
let totalCost = { total: 0, input: 0, output: 0, cached_input: 0 };
Expand All @@ -215,6 +217,14 @@ export function processTrace(trace: any): Trace {
const attrs = parseTraceAttributes(span.attributes);
lastParsedAttributes = JSON.parse(span.attributes); // Keep for backward compatibility

// Check for CleanLab trustworthiness score
if (
attrs.vendor === "cleanlab" &&
lastParsedAttributes["tlm.trustworthiness_score"]
) {
cleanlab_tlm_score = lastParsedAttributes["tlm.trustworthiness_score"];
}

// Update collectors
session_id = attrs.sessionId || session_id;
type = attrs.type || type;
Expand Down Expand Up @@ -292,5 +302,6 @@ export function processTrace(trace: any): Trace {
sorted_trace: trace,
trace_hierarchy: traceHierarchy,
raw_attributes: lastParsedAttributes,
cleanlab_tlm_score,
};
}