Skip to content

Feedback for “Ollama Observability and Tracing for local LLMs using Langfuse” #2440

@moe0277

Description

@moe0277

The docs didnt work for me until i changed
os.environ["LANGFUSE_BASE_URL"] = "https://us.cloud.langfuse.com"
to:
os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfus.com"


when looking at debug traces - I print out the value for os.environ["LANGFUSE_BASE_URL"]

[opc@llm1 ~]$ ./test.py
****MOEDBG LANGFUSE_BASE_URL = https://us.cloud.langfuse.com
2026-01-10 22:04:51,750 - langfuse - DEBUG - Thread: Media upload consumer thread #0 started and actively processing queue items
2026-01-10 22:04:51,750 - langfuse - DEBUG - Prompt cache initialized.
2026-01-10 22:04:51,750 - langfuse - DEBUG - Startup: Score ingestion consumer thread #0 started with batch size 15 and interval 1s
2026-01-10 22:04:51,750 - langfuse - INFO - Startup: Langfuse tracer successfully initialized | public_key=pk-lf-ebaacafd-2bfd-42e1-a06d-feba5d82c62c | host=https://cloud.langfuse.com | environment=default | sample_rate=1.0 | media_threads=1
2026-01-10 22:04:56,667 - langfuse - DEBUG - Trace: Processing span name='OpenAI-generation' | Full details:

Notice value for host= above... it doesn't match environ value... perhaps cloud.langfuse.com is defaulted or hardcoded somewhere?


Upon changing environ variable to LANGFUSE_HOST - it works

Here is a test using a local server:
[opc@llm1 ~]$ ./test1.py
***MOEDBG LANGFUSE_HOST = https://192.168.168.100:3000
http://192.168.168.6:3000
2026-01-10 22:13:09,814 - langfuse - DEBUG - Thread: Media upload consumer thread #0 started and actively processing queue items
2026-01-10 22:13:09,815 - langfuse - DEBUG - Prompt cache initialized.
2026-01-10 22:13:09,815 - langfuse - DEBUG - Startup: Score ingestion consumer thread #0 started with batch size 15 and interval 1s
2026-01-10 22:13:09,815 - langfuse - INFO - Startup: Langfuse tracer successfully initialized | public_key=pk-lf-ebaacafd-2bfd-42e1-a06d-feba5d82c62c | host=http://192.168.168.100:3000 | environment=default | sample_rate=1.0 | media_threads=1
2026-01-10 22:13:13,212 - langfuse - DEBUG - Trace: Processing span name='OpenAI-generation' | Full details:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions