Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'session' with 'trace' in Data Models and Classes #850

Open
10 tasks
devin-ai-integration bot opened this issue Mar 15, 2025 · 0 comments
Open
10 tasks

Replace 'session' with 'trace' in Data Models and Classes #850

devin-ai-integration bot opened this issue Mar 15, 2025 · 0 comments

Comments

@devin-ai-integration
Copy link
Contributor

Replace "session" with "trace" in Database Schema and Models

Description

As part of our transition to OpenTelemetry standards, we need to replace the notion of "sessions" with "traces" in our database schema and data models. This issue focuses on updating database tables, fields, and related data models in both repositories.

Current State

  • Supabase schema has sessions table and related tables with session references
  • ClickHouse already uses otel.otel_traces table but with session_id parameters
  • TypeScript interfaces like ISessionAndStats use session terminology
  • Python data models use session terminology

Required Changes

AgentOps.Next Repository

  • Create new traces table in Supabase that mirrors sessions table
  • Update foreign key references from session_id to trace_id in related tables
  • Update TypeScript interfaces:
    • ISessionAndStatsITraceAndStats
    • IExtendedSessionIExtendedTrace
  • Update database client functions to use trace terminology
  • Ensure ClickHouse queries consistently use trace terminology

AgentOps Repository

  • Rename Session class to Trace class
  • Update session-related event classes to use trace terminology
  • Update serialization/deserialization logic for trace data

Implementation Considerations

  • Plan for data migration from session tables to trace tables
  • Maintain data integrity during schema changes
  • Consider impact on existing queries and reports
  • Coordinate with API endpoint changes

Database Migration Strategy

  • Create new trace-based tables
  • Implement data migration scripts
  • Update application code to use new tables
  • Maintain backward compatibility during transition period

Acceptance Criteria

  • All database schemas use "trace" terminology
  • Data models properly reflect trace-based structure
  • Existing data is migrated to new schema
  • Queries and reports function correctly with new schema
  • Tests pass for database operations

Related Issues

  • API endpoint changes for session to trace transition
  • UI component updates for session to trace transition
  • Documentation updates for session to trace transition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants