Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components-mdx/integration-learn-more-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {

## Interoperability with the JS/TS SDK

You can use this integration together with the Langfuse [JS/TS SDK](/docs/observability/sdk/typescript/overview) to add additional attributes or group observations into a single trace.
You can use this integration together with the Langfuse [SDKs](/docs/observability/sdk/overview) to add additional attributes or group observations into a single trace.

<Tabs items={["Context Manager", "Observe Wrapper"]}>
<Tabs.Tab>

The [Context Manager](/docs/observability/sdk/typescript/instrumentation#context-management-with-callbacks) allows you to wrap your instrumented code using context managers (with `with` statements), which allows you to add additional attributes to the trace. Any observation created inside the callback will automatically be nested under the active observation, and the observation will be ended when the callback finishes.
The [Context Manager](/docs/observability/sdk/instrumentation#context-management-with-callbacks) allows you to wrap your instrumented code using context managers (with `with` statements), which allows you to add additional attributes to the trace. Any observation created inside the callback will automatically be nested under the active observation, and the observation will be ended when the callback finishes.

```typescript
import { startActiveObservation, propagateAttributes } from "npm:@langfuse/tracing";
Expand Down Expand Up @@ -51,12 +51,12 @@ await startActiveObservation("context-manager", async (span) => {
});
```

Learn more about using the Context Manager in the [JS/TS SDK](https://langfuse.com/docs/observability/sdk/typescript/instrumentation#context-management-with-callbacks) docs.
Learn more about using the Context Manager in the [Langfuse SDK instrumentation docs](https://langfuse.com/docs/observability/sdk/instrumentation#context-management-with-callbacks).

</Tabs.Tab>
<Tabs.Tab>

The [`observe` wrapper](/docs/observability/sdk/typescript/instrumentation#observe-wrapper) is a powerful tool for tracing existing functions without modifying their internal logic. It acts as a decorator that automatically creates a span or generation around the function call. You can use the `propagateAttributes` function to add attributes to the observation from within the wrapped function.
The [`observe` wrapper](/docs/observability/sdk/instrumentation#observe-wrapper) is a powerful tool for tracing existing functions without modifying their internal logic. It acts as a decorator that automatically creates a span or generation around the function call. You can use the `propagateAttributes` function to add attributes to the observation from within the wrapped function.

```typescript
import { observe, propagateAttributes } from "@langfuse/tracing";
Expand Down Expand Up @@ -98,7 +98,7 @@ const processUserRequest = observe(
const result = await processUserRequest("some query");
```

Learn more about using the Decorator in the [JS/TS SDK docs](/docs/observability/sdk/typescript/instrumentation#observe-wrapper) docs.
Learn more about using the Decorator in the [Langfuse SDK instrumentation docs](/docs/observability/sdk/instrumentation#observe-wrapper).

</Tabs.Tab>
</Tabs>
Expand Down
10 changes: 5 additions & 5 deletions components-mdx/integration-learn-more.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {

## Interoperability with the Python SDK

You can use this integration together with the Langfuse [Python SDK](/docs/observability/sdk/python/overview) to add additional attributes to the trace.
You can use this integration together with the Langfuse [SDKs](/docs/observability/sdk/overview) to add additional attributes to the trace.

<Tabs items={["Decorator", "Context Manager"]}>
<Tabs.Tab>

The [`@observe()` decorator](/docs/observability/sdk/python/instrumentation#custom-instrumentation) provides a convenient way to automatically wrap your instrumented code and add additional attributes to the trace.
The [`@observe()` decorator](/docs/observability/sdk/instrumentation#custom-instrumentation) provides a convenient way to automatically wrap your instrumented code and add additional attributes to the trace.

```python
from langfuse import observe, propagate_attributes, get_client
Expand Down Expand Up @@ -45,12 +45,12 @@ def my_llm_pipeline(input):
return result
```

Learn more about using the Decorator in the [Python SDK](/docs/observability/sdk/python/instrumentation#custom-instrumentation) docs.
Learn more about using the Decorator in the [Langfuse SDK instrumentation docs](/docs/observability/sdk/instrumentation#custom-instrumentation).

</Tabs.Tab>
<Tabs.Tab>

The [Context Manager](/docs/observability/sdk/python/instrumentation#custom-instrumentation) allows you to wrap your instrumented code using context managers (with `with` statements), which allows you to add additional attributes to the trace.
The [Context Manager](/docs/observability/sdk/instrumentation#custom-instrumentation) allows you to wrap your instrumented code using context managers (with `with` statements), which allows you to add additional attributes to the trace.

```python
from langfuse import get_client, propagate_attributes
Expand Down Expand Up @@ -79,7 +79,7 @@ with langfuse.start_as_current_observation(as_type="span", name="my-trace") as s
langfuse.flush()
```

Learn more about using the Context Manager in the [Python SDK](/docs/observability/sdk/python/instrumentation#custom-instrumentation) docs.
Learn more about using the Context Manager in the [Langfuse SDK instrumentation docs](/docs/observability/sdk/instrumentation#custom-instrumentation).

</Tabs.Tab>
</Tabs>
Expand Down
4 changes: 2 additions & 2 deletions components-mdx/prompt-linking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ openai.chat.completions.create(
</Tab>

<Tab>
Please make sure you have [OpenTelemetry already set up](/docs/observability/sdk/typescript/setup) for tracing.
Please make sure you have [OpenTelemetry already set up](/docs/observability/sdk/overview#initialize-tracing) for tracing.

```ts /langfusePrompt,/
import { observeOpenAI } from "@langfuse/openai";
Expand Down Expand Up @@ -217,7 +217,7 @@ chat_chain.invoke({"movie": "Dune 2", "criticlevel": "expert"}, config={"callbac

<Tab>

Please make sure you have [OpenTelemetry already set up](/docs/observability/sdk/typescript/setup) for tracing.
Please make sure you have [OpenTelemetry already set up](/docs/observability/sdk/overview#initialize-tracing) for tracing.

```ts
import { LangfuseClient } from "@langfuse/client";
Expand Down
4 changes: 2 additions & 2 deletions components/PropagationRestrictionsCallout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export function PropagationRestrictionsCallout({
attributes = ["userId", "sessionId", "metadata", "version", "tags"],
}: PropagationRestrictionsCalloutProps) {
const pythonLink =
"/docs/observability/sdk/python/instrumentation#propagate-attributes";
"/docs/observability/sdk/instrumentation#propagate-attributes";
const tsLink =
"/docs/observability/sdk/typescript/instrumentation#propagate-attributes";
"/docs/observability/sdk/instrumentation#propagate-attributes";

const formatAttributes = (attrs: string[]) => {
if (attrs.length === 1) return `\`${attrs[0]}\``;
Expand Down
42 changes: 21 additions & 21 deletions lib/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const nonPermanentRedirects = [
["/docs/reference", "https://api.reference.langfuse.com/"],
["/docs/integrations/api", "/docs/api"],
["/docs/integrations/sdk/typescript", "/docs/sdk/typescript"],
["/docs/integrations/sdk/python", "/docs/observability/sdk/python/overview"],
["/docs/integrations/sdk/python", "/docs/observability/sdk/overview"],
["/docs/langchain", "/docs/integrations/langchain/tracing"],
["/docs/langchain/python", "/docs/integrations/langchain/tracing"],
["/docs/langchain/typescript", "/docs/integrations/langchain/tracing"],
Expand Down Expand Up @@ -143,7 +143,7 @@ const nonPermanentRedirects = [
["/docs/cloud", "/docs/deployment/cloud"],
["/docs/guides/sdk-integration", "/docs/sdk/overview"],
["/docs/sdk", "/docs/sdk/overview"],
["/docs/sdk/python", "/docs/observability/sdk/python/overview"],
["/docs/sdk/python", "/docs/observability/sdk/overview"],
["/cookbook", "/guides"],
["/cookbook/:path*", "/guides/cookbook/:path*"],
["/docs/sdk/typescript", "/docs/sdk/typescript/guide"],
Expand Down Expand Up @@ -208,7 +208,7 @@ const nonPermanentRedirects = [
],
[
"/docs/sdk/python/decorators",
"/docs/observability/sdk/python/instrumentation#custom-instrumentation",
"/docs/observability/sdk/instrumentation#custom-instrumentation",
],
];

Expand Down Expand Up @@ -717,17 +717,17 @@ const mainDocsReorder202507 = [
"/docs/evaluation/dataset-runs/datasets",
],
["/docs/sdk/overview", "/docs/observability/sdk/overview"],
["/docs/sdk/python/example", "/docs/observability/sdk/python/overview"],
["/docs/sdk/python/low-level-sdk", "/docs/observability/sdk/python/overview"],
["/docs/sdk/python/sdk-v3", "/docs/observability/sdk/python/overview"],
["/docs/sdk/python/example", "/docs/observability/sdk/overview"],
["/docs/sdk/python/low-level-sdk", "/docs/observability/sdk/overview"],
["/docs/sdk/python/sdk-v3", "/docs/observability/sdk/overview"],
[
"/docs/sdk/typescript/example-notebook",
"/docs/observability/sdk/typescript/example-notebook",
"/guides/cookbook/js_langfuse_sdk",
],
["/docs/sdk/typescript/guide", "/docs/observability/sdk/typescript/guide"],
["/docs/sdk/typescript/guide", "/docs/observability/sdk/overview"],
[
"/docs/sdk/typescript/guide-web",
"/docs/observability/sdk/typescript/guide-web",
"/docs/observability/sdk/advanced-features#custom-scores-from-browser",
],
[
"/docs/security/example-python",
Expand Down Expand Up @@ -860,39 +860,39 @@ const oldDatasetRunSection202508 = [
const pythonv3sdkSection202508 = [
[
"/docs/observability/sdk/python/sdk-v3",
"/docs/observability/sdk/python/overview",
"/docs/observability/sdk/overview",
],
[
"/docs/observability/sdk/python/decorators",
"/docs/observability/sdk/python/overview",
"/docs/observability/sdk/instrumentation#custom-instrumentation",
],
[
"/docs/observability/sdk/python/example",
"/docs/observability/sdk/python/overview",
"/docs/observability/sdk/overview",
],
[
"/docs/observability/sdk/python/low-level-sdk",
"/docs/observability/sdk/python/overview",
"/docs/observability/sdk/overview",
],
[
"/guides/cookbook/python_decorators#interoperability-with-other-integrations",
"/docs/observability/sdk/python/instrumentation#native-instrumentations",
"/docs/observability/sdk/instrumentation#native-instrumentation",
],
[
"/guides/cookbook/python_decorators#customize-inputoutput",
"/docs/observability/sdk/python/instrumentation#trace-inputoutput-behavior",
"/docs/observability/sdk/instrumentation#trace-inputoutput-behavior",
],
];

// Redirect TypeScript SDK v3 docs to new docs
const typescriptsdkSection202508 = [
[
"/docs/observability/sdk/typescript/guide",
"/docs/observability/sdk/typescript/overview",
"/docs/observability/sdk/overview",
],
[
"/docs/observability/sdk/typescript/guide-web",
"/docs/observability/sdk/typescript/advanced-usage#custom-scores-from-browser",
"/docs/observability/sdk/advanced-features#custom-scores-from-browser",
],
[
"/docs/observability/sdk/typescript/example-notebook",
Expand All @@ -904,16 +904,16 @@ const typescriptsdkSection202508 = [
],
[
"/docs/observability/sdk/typescript/evaluation",
"/docs/evaluation/evaluation-methods/custom-scores",
"/docs/observability/sdk/advanced-features#create-scores",
],
[
"/guides/cookbook/integration_haystack",
"/integrations/frameworks/haystack",
],
["/sdk-v3", "/docs/observability/sdk/python/overview"],
["/sdk-v3", "/docs/observability/sdk/overview"],
[
"/docs/observability/sdk/typescript/sdk-v4",
"/docs/observability/sdk/typescript/overview",
"/docs/observability/sdk/overview",
],
];

Expand Down Expand Up @@ -976,7 +976,7 @@ const handbookRestructure202510 = [
["/handbook/working-at-langfuse/principles", "/handbook/how-we-work/principles"],
["/handbook/working-at-langfuse/spending-money", "/handbook/tools-and-processes/spending-money"],
["/handbook/working-at-langfuse/time-off", "/handbook/tools-and-processes/time-off"],
["/docs/sdk/python/sdk-v3#multi-project-setup-experimental", "/docs/observability/sdk/python/advanced-usage#multi-project-setup-experimental"],
["/docs/sdk/python/sdk-v3#multi-project-setup-experimental", "/docs/observability/sdk/advanced-features#multi-project-setup-experimental"],
];

// Launch Week 4 - Nov 2025
Expand Down
4 changes: 2 additions & 2 deletions pages/blog/2025-09-30-langfuse-september-update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Ensure your LLM responses conform to a specific JSON schema in your Prompt Exper

We’ve taken JS/TypeScript tracing up a notch: The Langfuse JS/TypeScript SDK v4 is out of beta as of September 2025! We’ve rebuilt this SDK on top of OpenTelemetry to improve the developer experience, make context management more robust, and allow for easy integrations with the JS/TS ecosystem (Provider SDKs, Vercel AI SDK, LangChain JS, Mastra, ...).

→ **[See the documentation](/docs/observability/sdk/typescript/overview)**
→ **[See the documentation](/docs/observability/sdk/overview)**

→ **[Upgrade now from v3 to v4](/docs/observability/sdk/typescript/upgrade-path)**
→ **[Upgrade now from v3 to v4](/docs/observability/sdk/upgrade-path#typescript-sdk---upgrade-path-v3-to-v4)**

If you are on Python, all of this is already available in the current version of the Python SDK.

Expand Down
2 changes: 1 addition & 1 deletion pages/blog/2025-11-25-vibe-coding-custom-annotation-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Conversely, if you're the only reviewer or your traces render fine in a generic

## The Setup That Makes This Possible

This project took an afternoon because the foundation already existed. Langfuse exposes [annotation queues](/docs/evaluation/evaluation-methods/annotation), [score configs](/faq/all/manage-score-configs#create-a-score-config), and [trace data](/docs/observability/overview) through a [clean API](/docs/api-and-data-platform/features/public-api). The [TypeScript SDK](/docs/observability/sdk/typescript/overview) provides type safety. All the infrastructure for managing human evaluation is already running.
This project took an afternoon because the foundation already existed. Langfuse exposes [annotation queues](/docs/evaluation/evaluation-methods/annotation), [score configs](/faq/all/manage-score-configs#create-a-score-config), and [trace data](/docs/observability/overview) through a [clean API](/docs/api-and-data-platform/features/public-api). The [Langfuse SDKs](/docs/observability/sdk/overview) provide type safety. All the infrastructure for managing human evaluation is already running.

What remained was straightforward: build a UI that fetches queue items, renders them in a domain-specific way, and submits scores back. No auth system to build. No database schema to design. No score aggregation logic to write.

Expand Down
2 changes: 1 addition & 1 deletion pages/changelog/2023-10-25-support-pydantic-v1-and-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ From `1.1.3` onwards, the Python SDK supports both Pydantic v1 and v2.
import { Code } from "lucide-react";

<Cards num={1}>
<Card title="Python SDK" href="/docs/observability/sdk/python/overview" icon={<Code />} />
<Card title="Langfuse SDKs" href="/docs/observability/sdk/overview" icon={<Code />} />
</Cards>
2 changes: 1 addition & 1 deletion pages/changelog/2025-01-30-sampling-js-ts-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import { Shuffle } from "lucide-react";
/>
<Card
title="TypeScript SDK"
href="/docs/observability/sdk/typescript/overview"
href="/docs/observability/sdk/overview"
icon={<Shuffle />}
/>
</Cards>
12 changes: 6 additions & 6 deletions pages/changelog/2025-08-28-typescript-sdk-v4-ga.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ await startActiveObservation("user-request", async (span) => {
});
```

[Learn more →](/docs/observability/sdk/typescript/instrumentation#custom-instrumentation)
[Learn more →](/docs/observability/sdk/instrumentation#custom-instrumentation)

</Tab>

Expand All @@ -66,7 +66,7 @@ const tracedFunction = observe(async (source: string) => {
const result = await tracedFunction("API");
```

[Learn more →](/docs/observability/sdk/typescript/instrumentation#observe-wrapper)
[Learn more →](/docs/observability/sdk/instrumentation#observe-wrapper)

</Tab>

Expand All @@ -86,7 +86,7 @@ span.update({ output: "Successfully answered." });
span.end(); // Required: manually end the observation
```

[Learn more →](/docs/observability/sdk/typescript/instrumentation#manual-observations)
[Learn more →](/docs/observability/sdk/instrumentation#manual-observations)

</Tab>

Expand All @@ -98,17 +98,17 @@ span.end(); // Required: manually end the observation
<Card
icon={<BookOpen size="24" />}
title="Overview"
href="/docs/observability/sdk/typescript/overview"
href="/docs/observability/sdk/overview"
arrow
/>
<Card
icon={<Plug size="24" />}
title="Instrumentation"
href="/docs/observability/sdk/typescript/instrumentation"
href="/docs/observability/sdk/instrumentation"
arrow
/>
</Cards>

**Upgrading from v3?** Follow the [upgrade guide](/docs/observability/sdk/typescript/upgrade-path) for step-by-step migration instructions.
**Upgrading from v3?** Follow the [upgrade guide](/docs/observability/sdk/upgrade-path#typescript-sdk---upgrade-path-v3-to-v4) for step-by-step migration instructions.

Have thoughts or issues? **Share feedback in the discussion:** [GitHub Discussions #8403](https://github.com/orgs/langfuse/discussions/8403).
4 changes: 2 additions & 2 deletions pages/docs/evaluation/evaluation-methods/custom-scores.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ await langfuse.flush();
</Tab>
</LangTabs>

→ More details in [Python SDK docs](/docs/observability/sdk/python/evaluation#create-scores) and [JS/TS SDK docs](/docs/sdk/typescript/guide#score). See [API reference](/docs/api) for more details on POST/GET score configs endpoints.
→ More details in the [Langfuse SDK advanced features guide](/docs/observability/sdk/advanced-features#create-scores). See [API reference](/docs/api) for more details on POST/GET score configs endpoints.

### Preventing Duplicate Scores

Expand Down Expand Up @@ -478,7 +478,7 @@ await langfuse.flush();

</Tab>

→ More details in [Python SDK docs](/docs/observability/sdk/python/evaluation#create-scores) and [JS/TS SDK docs](/docs/sdk/typescript/guide#score). See [API reference](/docs/api) for more details on POST/GET score configs endpoints.
→ More details in the [Langfuse SDK advanced features guide](/docs/observability/sdk/advanced-features#create-scores). See [API reference](/docs/api) for more details on POST/GET score configs endpoints.

</LangTabs>

Expand Down
6 changes: 3 additions & 3 deletions pages/docs/evaluation/experiments/experiments-via-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ print(result.format())
</Tab>
<Tab>
{/* JS/TS SDK */}
Make sure that OpenTelemetry is properly set up for traces to be delivered to Langfuse. See the [tracing setup documentation](/docs/observability/sdk/typescript/setup#tracing-setup) for configuration details. Always flush the span processor at the end of execution to ensure all traces are sent.
Make sure that OpenTelemetry is properly set up for traces to be delivered to Langfuse. See the [tracing setup documentation](/docs/observability/sdk/overview#initialize-tracing) for configuration details. Always flush the span processor at the end of execution to ensure all traces are sent.

```typescript
import { OpenAI } from "openai";
Expand Down Expand Up @@ -134,7 +134,7 @@ console.log(await result.format());
await otelSdk.shutdown();
```

**Note for JS/TS SDK**: OpenTelemetry must be properly set up for traces to be delivered to Langfuse. See the [tracing setup documentation](/docs/observability/sdk/typescript/setup#tracing-setup) for configuration details. Always flush the span processor at the end of execution to ensure all traces are sent.
**Note for JS/TS SDK**: OpenTelemetry must be properly set up for traces to be delivered to Langfuse. See the [tracing setup documentation](/docs/observability/sdk/overview#initialize-tracing) for configuration details. Always flush the span processor at the end of execution to ensure all traces are sent.

</Tab>
</LangTabs>
Expand Down Expand Up @@ -853,7 +853,7 @@ _See [Python SDK](/docs/sdk/python/sdk-v3) docs for more details._
<Tab>
{/* JS/TS SDK */}

Please make sure you have [the JS/TS SDK](/docs/observability/sdk/typescript/setup) set up for tracing of your application. If you use Langfuse for [observability](/docs/observability/overview), this is the same setup.
Please make sure you have [the Langfuse SDK](/docs/observability/sdk/overview#initialize-tracing) set up for tracing of your application. If you use Langfuse for [observability](/docs/observability/overview), this is the same setup.

Example:

Expand Down
Loading
Loading