Skip to main content

Python SDK for LangTrace

Project description

LangTrace

LangTrace is a Python package designed to instrument traces of various Language Model as a Service (LLMS) products, such as OpenAI and Anthropic, as well as vector databases like Pinecone. This package provides functionalities to capture and analyze traces, allowing users to gain insights into the behavior and performance of these systems.

Features

  • Trace Instrumentation: LangTrace enables the instrumentation of LLMS products and vector databases to capture detailed traces of their operations.
  • Compatibility: LangTrace is compatible with various LLMS products, including OpenAI and Anthropic, as well as vector databases like Pinecone and Chroma which adhere to OpenTelemetry standards
  • Install the SDK

    pip install langtrace-python-sdk
    

    Usage

    from langtrace_python_sdk import langtrace
    
    langtrace.init()
    

    Voila! now you're all set.

    Examples

    Log Traces

    from langtrace_python_sdk import langtrace
    
    langtrace.init(log_spans_to_console=True)
    

    Export traces to an external endpoint.

    Add the endpoint url inside .env as LANGTRACE_URL

    from langtrace_python_sdk import langtrace
    
    langtrace.init(write_to_remote_url=True)
    

    Support

  • OpenAI
  • Anthropic
  • Chroma
  • PineCone
  • LangChain
  • LlamaIndex
  • Project details


    Release history Release notifications | RSS feed

    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

    Source Distribution

    langtrace-python-sdk-1.1.7.tar.gz (32.7 kB view hashes)

    Uploaded Source

    Built Distribution

    langtrace_python_sdk-1.1.7-py3-none-any.whl (51.7 kB view hashes)

    Uploaded Python 3

    Supported by

    AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page