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 API Functions and SDK Components #849

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

Comments

@devin-ai-integration
Copy link
Contributor

Replace "session" with "trace" in API Endpoints and Routes

Description

As part of our transition to OpenTelemetry standards, we need to replace the notion of "sessions" with "traces" across our API endpoints and routes. This issue focuses on updating API endpoints, function names, and parameters in both repositories.

Current State

  • V1-V3 API endpoints use "sessions" terminology
  • V4 API endpoints already use "traces" but still have session_id parameters
  • SDK functions like start_session and end_session use session terminology

Required Changes

AgentOps.Next Repository

  • Create new /traces endpoints in V1-V3 API that mirror functionality of /sessions endpoints
  • Update V4 API to replace all session_id parameters with trace_id
  • Update event handlers to use trace terminology
  • Add deprecation notices to session-based endpoints
  • Update API documentation to reflect new terminology

AgentOps Repository

  • Create new public API functions like start_trace and end_trace that mirror functionality of session functions
  • Update SpanKind.SESSION to SpanKind.TRACE in span kinds definition
  • Update session decorator to trace decorator
  • Add deprecation warnings to session-based functions
  • Ensure backward compatibility for existing users

Implementation Considerations

  • Maintain backward compatibility for existing integrations
  • Provide clear migration path for users
  • Follow OpenTelemetry standards for trace and span naming
  • Coordinate with database schema changes

Acceptance Criteria

  • All new API endpoints use "trace" terminology
  • Existing session endpoints include deprecation notices
  • SDK functions properly implement trace-based functionality
  • Documentation is updated to reflect new terminology
  • Tests pass for both new and legacy endpoints

Related Issues

  • Database schema 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