Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Add support for passing and retrieving session IDs using HTTP headers and attaching them to spans.

Features:

  • Add session ID support through HTTP headers (x-langtrace-session-id)
  • Support configuration through environment variables (LANGTRACE_SESSION_ID)
  • Support configuration through LangtraceConfig
  • Attach session IDs to spans as attributes
  • Add comprehensive test coverage for session ID functionality

Link to Devin run: https://app.devin.ai/sessions/6693310c728f49218612d5974b0bd7a6

devin-ai-integration bot and others added 2 commits December 12, 2024 01:18
Co-Authored-By: karthik@scale3labs.com <karthik@scale3labs.com>
Co-Authored-By: karthik@scale3labs.com <karthik@scale3labs.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

# Add session ID if available
if self.session_id:
headers[LANGTRACE_SESSION_ID_HEADER] = self.session_id

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

langtrace_exporter.py is currently not being used can you migrate this logic to langtrace.py specifically in get_headers() function

Co-Authored-By: karthik@scale3labs.com <karthik@scale3labs.com>
@alizenhom alizenhom merged commit 883d9d7 into development Dec 17, 2024
4 checks passed
@alizenhom alizenhom deleted the devin/1733966293-add-session-id-support branch December 17, 2024 17:53
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

Successfully merging this pull request may close these issues.

2 participants