Skip to main content
On the Sessions page, users can view a list of sessions created within a project. Each session is identified by a unique Session ID and groups traces based on this attribute.

Key Features

  • Timeframe Filtering: Easily filter sessions by specific time periods to access relevant data quickly.
  • Session Overview: View a comprehensive list of sessions, providing a snapshot of key information such as session duration and user interactions.
  • Detailed Session Insights: Click on a session to access in-depth details, including conversation history and trace specifics.
  • Trace Analysis: Click on View Trace to dive deeper into individual traces for thorough analysis.
  • Performance Metrics: Monitor system performance with metrics like latency and cost, and evaluate interaction quality through evaluation metrics.
Sessions Overview

How to Add Sessions

To associate interactions with a specific session, you can use the following methods:

1. Include session.id in a Span

When creating a span, include the session.id attribute to link interactions to a specific session:
from fi_instrumentation import register, FITracer

trace_provider = register(
    project_type=ProjectType.OBSERVE,
    project_name="PROJECT_NAME",
)

tracer = FITracer(trace_provider.get_tracer(__name__))

with tracer.start_as_current_span(
    f"SPAN_NAME",
) as span:
    span.set_status(Status(StatusCode.OK))
    span.set_attribute("session.id", "session123")
    span.set_attribute("input.value", "input")
    span.set_attribute("output.value", "output")

2. Use using_session Context Manager

You can use the using_session context manager to set session.id for all spans within the context. This method ensures that the session ID is consistently passed as a span attribute:
from fi_instrumentation import using_session

with using_session(session_id="my-session-id"):
    # Calls within this block will generate spans with the attributes:
    # "session.id" = "my-session-id"
    ...
For more information on how to set session.id using Trace AI helper functions, refer to the manual tracing guide.

Usage

Sessions are particularly useful for:
  • Debugging chatbot interactions by reviewing grouped traces.
  • Analyzing conversation flow and identifying areas for improvement.
  • Monitoring system performance and cost efficiency.
For more detailed trace analysis, users can click the View Trace button to access specific trace information.
I