Setting up Traceloop SDK for Middleware (Go)

This guide will walk you through the process of setting up the Traceloop SDK to work with Middleware for LLM Observability in a Go environment.

1. Install the SDK

Run the following command in your terminal:

2. Initialize the SDK

In your LLM application, initialize the Traceloop tracer:

3. Log Your Prompts

Currently, automatic instrumentation is not available for Go libraries. You'll need to manually log your prompts and completions.

Here's an example of how to log prompts and completions when using the OpenAI library:

Viewing Your Traces

After setting up the Traceloop SDK with Middleware, you'll be able to view your LLM application traces in your Middleware LLM Observability Section.

This integration provides instant visibility into everything happening within your LLM, including calls to vector databases or other external services.

For more detailed information on setting up Traceloop with Go, please refer to the Traceloop Go documentation.

Need assistance or want to learn more about using Traceloop with Middleware? Contact our support team in Slack.