Setup - How to set up and connect¶
Here we will explain how you (as a developer) can connect your AI-enabled application to our Langfuse instance. We will analyze 2 use-cases: Drupal 11 website and a Python application.
Prerequisite: Get Your Credentials¶
Before connecting any application, you need your unique API keys.
- Make sure your company has an Active AI project in our Platform - if that’s not the case, please talk to your customer success representative - or request a demo.
- Log into the Dropsolid Experience Platform - and follow these steps to get the keys.
- If you are having the Enterprise Tier (permanent or temporary) you should be able to see Langfuse credentials, under Logging & tracing (copy the Public and Secret Key).

- Depending on your specific scenario - you can now paste your keys and start using Langfuse.
- To access the Langfuse instance itself - you can go to Platform’s Link - and log-in via the Dropsolid Experience Platform button:

We will explore 2 particular cases: a Drupal 11 Website & a Python application.
Use Case 1: Connecting a Drupal 11 Website¶
If you are building an AI-powered Drupal 11 site using the official AI module ecosystem, we have made observability incredibly simple. You don't need to write any custom tracing code; our dedicated module handles it for you.
Step 1: Install necessary modules¶
Ensure you have the following requirements met:
- PHP 8.2.x (make sure the
composer.jsonalso points to 8.2.x) - Drupal that supports the
ai.moduleversion 1.2.x
1.1 - Easiest way is to install AI Provider Dropsolid AI module (helper module, target alpha), this will pull:
- latest ai.module >= 1.2.x
- latest ai_provider_litellm >= 1.2.x
1.2 - Because the https://www.drupal.org/project/langfuse module is optional - you would need to manually install it: composer require drupal/langfuse. You’d have to enable main module and the logging sub-module.
1.3 - Because the https://www.drupal.org/project/ai_dropsolid module is also optional - you would need to manually install it. This module is used to enhance integration with Dropsolid’s AI platform - offers custom tokenizers, enriches requests with proper tags, etc. (optional, but recommended).
1.4 - Once everything is downloaded and installed - you can now navigate to: /admin/config/ai/providers/dropsolidai
Using Manual Setup (Automatic -> isn’t available yet) - you can go top-to-bottom to make sure that every component works as expected:

Step 2: Configure the Credentials¶
- Initially some tools won’t be working, because credentials won’t be in-place. You’d need to do a manual process of copy-pasting the keys from the Platform → into the proper places in your Drupal website.
- In example, for Langfuse:
- You’d need to go the Logging & Tracing section in the Platform and copy Public & Secret Keys (see 1st image in this article, ☝ ).
- Paste in your Secret Key, Public Key, and the Host URL you retrieved from the platform, in Drupal’s Langfuse Settings Form
/admin/config/system/langfuse/settings:
- Verify every section - making sure that all the modules are configured properly.
Step 3: Zero-Configuration Tracing¶
That's it!
Because of how the module integrates with the core AI module, any AI action - whether it's generating text, using the AI Search Block (RAG), or running an AI Agent - will automatically be grouped into traces and sent to your Langfuse dashboard.
Use Case 2: Connecting a Custom Python Application¶
If you are building a decoupled AI microservice, a standalone script, or a custom FastAPI backend, you can connect to our observability layer using the official Langfuse Python SDK.
Step 1: Install the SDK¶
Install the Langfuse package via pip:
pip install langfuse
Step 2: Set Environment Variables¶
Expose your Dropsolid credentials to your application environment. We recommend doing this via a .env file:
LANGFUSE_PUBLIC_KEY="pk-lf-..."
LANGFUSE_SECRET_KEY="sk-lf-..."
LANGFUSE_BASE_URL="https://tracing.prod.platform.dropsolid.ai"
Step 3: Instrument Your Code¶
The easiest way to trace your Python functions is by using the @observe() decorator. This automatically captures inputs, outputs, and execution times.
Here is a quick example:
from langfuse.decorators import observe
# The @observe decorator automatically creates a span in Langfuse
@observe()
def generate_summary(user_text):
# Your custom AI logic here (e.g., calling OpenAI or DropSolid AI Gateway)
prompt = f"Summarize the following: {user_text}"
# ... execution logic ...
response = "This is a summary of the text."
return response
# Run your function
generate_summary("Hello, please summarize this long article for me.")
Tip: If you are using the official OpenAI Python SDK, Langfuse also offers a simple drop-in replacement (from langfuse.openai import openai) that automatically traces every single completion request without needing decorators.
You can find more examples and information on the official Langfuse’s Python SDK section.
Note
Note:
- Traces in Dropsolid Tracing - take few seconds to appear. You might need to refresh Langfuse in a few seconds to see them popup.
- Dashboard in our Platform is updated once a day - so most likely you will see statistics from the usage from yesterday.