Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.latitude.so/llms.txt

Use this file to discover all available pages before exploring further.

User tracking

Latitude can associate traces with an end-user identifier so you can investigate one user’s experience, find users affected by an issue, or filter search results to a specific customer or account.

Send a user id

Pass a user id through capture() at the request, conversation turn, or agent entry point.
import { capture } from "@latitude-data/telemetry"

await capture(
  "support-agent-turn",
  async () => {
    return agent.run(userMessage)
  },
  {
    userId: user.id,
  },
)

Use user ids in Latitude

With user ids, you can:
  • filter traces by user
  • search within one user’s traces
  • inspect sessions and traces associated with that user
  • understand which users are affected by a recurring issue
User ids are most useful when they are stable identifiers from your application, such as an internal user, account, or customer id.
  • Sessions: Group multiple traces into a conversation
  • Filters: Filter traces by user id
  • Search: Search within filtered trace cohorts