Manage trace context and control logging behavior with the Galileo Context Manager
galileo_context
object, in TypeScript this is available as a set of distinct top-level functions.
GALILEO_PROJECT
and GALILEO_LOG_STREAM
environment variables to determine which project and Log stream to log to. You can override this by initializing the Galileo context with a project and Log stream name.
galileo_context
, object in a with statement. Every log inside this block, including nested calls, will use the specified project and Log stream.
@log
decorator.
galileo_context
calls to temporarily override the project or Log stream:
@log
decorator, wrapped in the TypeScript log
wrapper, or created automatically by an experiment, then this will return that logger instance so you can manually add additional spans.
galileo_context
and make sure to call galileo_context.flush()
at the end of your notebook.start_session
function.
set_session
function, passing the session ID. This is useful if you want to persist a session, for example saving a chatbot conversation with a user mid-conversation, then resuming the next time a user connects.
start_session
function.