Skip to content

Commit 25baf68

Browse files
authored
feat: add faq section (langfuse#642)
1 parent 6405199 commit 25baf68

26 files changed

+486
-11
lines changed

components/faq/FaqIndex.tsx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { getPagesUnderRoute } from "nextra/context";
2+
import { type Page } from "nextra";
3+
import { Card, Cards } from "nextra-theme-docs";
4+
import { MessageCircleQuestion } from "lucide-react";
5+
import Link from "next/link";
6+
7+
const PREVIEW_PAGES_PER_TAG = 5;
8+
9+
export const FaqIndex = () => {
10+
const pages = getPagesUnderRoute("/faq/all") as Array<
11+
Page & { frontMatter: any }
12+
>;
13+
const categorizedPages = pages
14+
.filter((page) => page.route !== "/faq/all")
15+
.reduce((acc, page) => {
16+
const tags = page.frontMatter?.tags || ["Other"];
17+
tags.forEach((tag: string) => {
18+
if (!acc[tag]) acc[tag] = [];
19+
acc[tag].push(page);
20+
});
21+
return acc;
22+
}, {} as Record<string, Array<Page & { frontMatter: any }>>);
23+
24+
return (
25+
<>
26+
{Object.entries(categorizedPages)
27+
.sort(([tagA], [tagB]) => {
28+
if (tagA === "Other") return 1;
29+
if (tagB === "Other") return -1;
30+
return tagA.localeCompare(tagB);
31+
})
32+
.map(([tag, pages]) => (
33+
<div key={tag} className="my-10">
34+
<h3 className="font-semibold tracking-tight text-slate-900 dark:text-slate-100 text-2xl">
35+
{tag.charAt(0).toUpperCase() + tag.slice(1)}
36+
</h3>
37+
<Cards num={1}>
38+
{pages.slice(0, PREVIEW_PAGES_PER_TAG).map((page) => (
39+
<Card
40+
href={page.route}
41+
key={page.route}
42+
title={
43+
page.meta?.title || page.frontMatter?.title || page.name
44+
}
45+
icon={<MessageCircleQuestion />}
46+
arrow
47+
>
48+
{""}
49+
</Card>
50+
))}
51+
</Cards>
52+
<p className="mt-4">
53+
<Link href={`/faq/tag/${encodeURIComponent(tag)}`}>
54+
{pages.length > PREVIEW_PAGES_PER_TAG
55+
? `View all (${pages.length - PREVIEW_PAGES_PER_TAG} more) ->`
56+
: `View all ->`}
57+
</Link>
58+
</p>
59+
</div>
60+
))}
61+
</>
62+
);
63+
};

components/faq/FaqPreview.tsx

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import { getPagesUnderRoute } from "nextra/context";
2+
import { type Page } from "nextra";
3+
import { Card, Cards } from "nextra-theme-docs";
4+
import { MessageCircleQuestion } from "lucide-react";
5+
import Link from "next/link";
6+
7+
export const getFaqPages = () => {
8+
return getPagesUnderRoute("/faq/all") as Array<Page & { frontMatter: any }>;
9+
};
10+
11+
export const getFilteredFaqPages = (
12+
faqPages: Array<Page & { frontMatter: any }>,
13+
tags: string[],
14+
limit: number | undefined = undefined
15+
) => {
16+
const pages = faqPages
17+
.filter((page) => page.route !== "/faq/all")
18+
.filter((page) => {
19+
const faqTags = page.frontMatter?.tags || [];
20+
return faqTags.some((tag) => tags.includes(tag));
21+
});
22+
return limit === undefined ? pages : pages.slice(0, limit);
23+
};
24+
25+
export const FaqPreview = ({
26+
tags,
27+
renderAsCards = false,
28+
}: {
29+
tags: string[];
30+
renderAsCards?: boolean;
31+
}) => {
32+
const faqPages = getFaqPages();
33+
const filteredFaqPages = getFilteredFaqPages(faqPages, tags, 10);
34+
35+
return <FaqList pages={filteredFaqPages} renderAsCards={renderAsCards} />;
36+
};
37+
38+
export const FaqList = ({
39+
pages,
40+
renderAsCards = false,
41+
}: {
42+
pages: Array<Page & { frontMatter: any }>;
43+
renderAsCards?: boolean;
44+
}) => {
45+
if (renderAsCards) {
46+
return (
47+
<Cards num={1}>
48+
{pages.map((page) => (
49+
<Card
50+
href={page.route}
51+
key={page.route}
52+
title={page.meta?.title || page.frontMatter?.title || page.name}
53+
icon={<MessageCircleQuestion />}
54+
arrow
55+
>
56+
{""}
57+
</Card>
58+
))}
59+
</Cards>
60+
);
61+
}
62+
return (
63+
<>
64+
<ul className="list-disc list pl-6 mt-5">
65+
{pages.map((page) => (
66+
<li
67+
className="my-2"
68+
id={page.route.replace("/faq/all/", "")}
69+
key={page.route.replace("/faq/all/", "")}
70+
>
71+
<Link
72+
key={page.route}
73+
href={page.route}
74+
className="nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
75+
>
76+
<span className="">
77+
{page.meta?.title || page.frontMatter?.title || page.name}
78+
</span>
79+
</Link>
80+
</li>
81+
))}
82+
</ul>
83+
</>
84+
);
85+
};

pages/_meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
"title": "Guides",
3535
"display": "hidden"
3636
},
37+
"faq": {
38+
"type": "page",
39+
"title": "FAQ",
40+
"display": "hidden"
41+
},
3742
"cookbook": {
3843
"type": "page",
3944
"title": "Cookbook",

pages/docs/data-security-privacy.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ With Langfuse Cloud, we handle:
6565
| Framework | Status (Langfuse Cloud) |
6666
| ------------- | --------------------------------------------------------------------------------------------------------------------------- |
6767
| GDPR | Compliant. DPA available upon request on Pro and Team plan. |
68-
| SOC 2 Type II | Certified. Report available upon request on Team plan. |
68+
| SOC 2 Type II | Certified. Report available upon request on Team plan. |
6969
| ISO 27001 | Certified. Certificate available upon request on Team plan. |
7070
| HIPAA | Not compliant. However, compliance can be attained by [self-hosting](/docs/deployment/self-host) on own infrastructure/VPC. |
7171

@@ -83,3 +83,9 @@ We encourage employees and third parties to report breaches to us via email (leg
8383
## Notifications
8484

8585
If you want to notify Langfuse of any security-related matters. Please reach out to us via security@langfuse.com
86+
87+
## FAQ
88+
89+
import { FaqPreview } from "@/components/faq/FaqPreview";
90+
91+
<FaqPreview tags={["security"]} />

pages/docs/deployment/self-host.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,15 +433,16 @@ To deploy this image on heroku you have to run through the steps in the followin
433433
heroku container:release web --app=[HEROKU_APP_NAME]
434434
```
435435
436-
## FAQ
437-
438-
- **Are there prebuilt ARM images available?** No, currently we do not publish official ARM images. However, you can build your own ARM images using the Dockerfile in the Langfuse repository.
439-
- **Can I deploy multiple instances of Langfuse behind a load balancer?** Yes, you can deploy multiple instances of Langfuse behind a load balancer. Make sure that your database is configured to handle the number of connections.
440-
441436
## Support
442437
443438
If you experience any issues, please join us on [Discord](/discord) or contact the maintainers at support@langfuse.com.
444439
445440
For support with production deployments, the Langfuse team provides dedicated enterprise support. To learn more, reach out to enterprise@langfuse.com or [schedule a demo](/schedule-demo).
446441
447442
Alternatively, you may consider using [Langfuse Cloud](/docs/deployment/cloud), which is a fully managed version of Langfuse. You can find information about its security and privacy [here](/docs/data-security-privacy).
443+
444+
## FAQ
445+
446+
import { FaqPreview } from "@/components/faq/FaqPreview";
447+
448+
<FaqPreview tags={["self-hosting"]} />

pages/docs/get-started.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,3 +359,9 @@ import IconOpenai from "@/components/icons/openai";
359359
arrow
360360
/>
361361
</Cards>
362+
363+
## FAQ
364+
365+
import { FaqPreview } from "@/components/faq/FaqPreview";
366+
367+
<FaqPreview tags={["setup"]} />

pages/docs/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: Langfuse is an open source LLM engineering platform. It includes observability, analytics, and experimentation features.
3+
faq-tags: [security]
34
---
45

56
import { ProductUpdateSignup } from "@/components/productUpdateSignup";

pages/docs/tracing.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ Langfuse's client SDKs and integrations are all designed to queue and batch requ
132132

133133
All integrations have a sensible default configuration, but you can customise the batching behaviour to suit your needs.
134134

135-
| Option (Python) [SDK constructor, Environment] | Option (JS) | Description |
136-
| -------------------- | -------------------- | -------------------------------------------------------- |
137-
| `flush_at`, `LANGFUSE_FLUSH_AT` | `flushAt` | The maximum number of events to batch up before sending. |
138-
| `flush_interval`, `LANGFUSE_FLUSH_INTERVAL` (s) | `flushInterval` (ms) | The maximum time to wait before sending a batch. |
135+
| Option (Python) [SDK constructor, Environment] | Option (JS) | Description |
136+
| ----------------------------------------------- | -------------------- | -------------------------------------------------------- |
137+
| `flush_at`, `LANGFUSE_FLUSH_AT` | `flushAt` | The maximum number of events to batch up before sending. |
138+
| `flush_interval`, `LANGFUSE_FLUSH_INTERVAL` (s) | `flushInterval` (ms) | The maximum time to wait before sending a batch. |
139139

140140
You can e.g. set `flushAt=1` to send every event immediately, or `flushInterval=1000` to send every second.
141141

@@ -242,3 +242,9 @@ langfuse_handler.flush()
242242

243243
</Tab>
244244
</Tabs>
245+
246+
## FAQ
247+
248+
import { FaqPreview } from "@/components/faq/FaqPreview";
249+
250+
<FaqPreview tags={["tracing"]} />

pages/faq/_meta.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"-- Switcher": {
3+
"type": "separator",
4+
"title": "Switcher"
5+
},
6+
"index": "Overview",
7+
"tag": "By Tags",
8+
"all": {
9+
"type": "children",
10+
"display": "hidden"
11+
}
12+
}

pages/faq/all/api-limits.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Are there any limits to the Langfuse API?
3+
tags: [api]
4+
---
5+
6+
# Are there any limits to the Langfuse API?
7+
8+
While the Langfuse API is extremely open and flexible [1], there are some limits to ensure the stability and performance of the platform. The limits are as follows:
9+
10+
- Payloads: 5MB per request and 5MB per response
11+
- Rate Limits:
12+
- On Langfuse Cloud
13+
- Hobby and Pro plans: 1000 requests per minute
14+
- Team plan: custom Limits
15+
- Self-hosted instances: no hard limits, depends on your infrastructure capacity

pages/faq/all/arm-images.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Are prebuilt ARM images available?
3+
tags: [self-hosting]
4+
---
5+
6+
# Are there prebuilt ARM images available?
7+
8+
No, currently we do not publish official ARM images. However, you can build your own ARM images using the Dockerfile in the Langfuse repository. Please track the `production` branch for the latest changes while avoiding the `main` branch, which may contain unstable changes.

pages/faq/all/cloud-data-regions.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: What data regions does Langfuse Cloud support?
3+
tags: [security, setup, cloud]
4+
---
5+
6+
# What data regions does Langfuse Cloud support?
7+
8+
Langfuse supports the following data regions:
9+
10+
- **US, Northern California (AWS us-west-1)**: https://us.cloud.langfuse.com
11+
- **Europe, Frankfurt, Germany (AWS eu-central-1)**: https://cloud.langfuse.com
12+
13+
All data, user accounts, and infrastructure are completely separated between these two regions. You can have accounts in both regions.
14+
15+
### How do I connect to a specific data region?
16+
17+
To connect to a specific data region, you need to set the `LANGFUSE_HOST` (Python) or `LANGFUSE_BASEURL` (JS/TS) in your environment configuration or when intializing the SDKs. Here are examples for both regions:
18+
19+
## What to take into account when selecting a data region
20+
21+
When selecting a data region, consider the following factors:
22+
23+
- Compliance and data privacy requirements
24+
- Latency when fetching prompts from Langfuse prompt management
25+
- Latency when working in the Langfuse interface
26+
27+
Less of a concern:
28+
29+
- Tracing ingestion latency as these requests are batched and sent in the background
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: I cannot connect to my docker deployment, what should I do?
3+
tags: [self-hosting]
4+
---
5+
6+
# I cannot connect to my self-hosted Langfuse instance, what should I do?
7+
8+
If you encounter issues while [self-hosting](/docs/deployment/self-host) Langfuse, ensure the following:
9+
10+
- `NEXTAUTH_URL` exactly matches the URL you're accessing Langfuse with. Pay attention to the protocol (http vs https) and the port (e.g., 3000 if you do not expose Langfuse on port 80).
11+
- Set `HOSTNAME` to `0.0.0.0` if you cannot access Langfuse.
12+
- SSO: Ensure that the OAuth provider is configured correctly. The return path needs to match the `NEXTAUTH_URL`, and the OAuth client needs to be configured with the correct callback URL.
13+
- Encode special characters in `DATABASE_URL`, see this StackOverflow [answer](https://stackoverflow.com/a/68213745) for details.
14+
- If you use the SDKs to connect with Langfuse, use `auth_check()` to verify that the connection works.
15+
- Make sure you are at least on Postgres 12.

pages/faq/all/missing-traces.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: I have setup Langfuse, but I do not see any traces in the dashboard. How to solve this?
3+
tags: [setup, tracing]
4+
---
5+
6+
# I have setup Langfuse, but I do not see any traces in the dashboard. How to solve this?
7+
8+
Langfuse runs all tracing integrations asynchronously ([learn more](/docs/tracing#queuing-batching)). Here are a few steps to resolve this issue:
9+
10+
1. **Verify Integration**: Ensure that your application is correctly integrated with Langfuse. Follow the [quickstart guide](/docs/get-started) to verify your setup.
11+
2. **Check API Credentials**: Make sure that the API credentials used in your application match those created in your Langfuse project settings.
12+
3. **Inspect Tracing Configuration**: Ensure that your tracing configuration is correctly set up. For example, verify that the `LANGFUSE_HOST` (Python) or `LANGFUSE_BASEURL` (JS/TS) is set to the correct endpoint.
13+
4. **Review Logs**: Check the logs of your application to see if there are any errors related to Langfuse. This can help identify issues with the integration or network connectivity. Optionally, you can enable debug logging to get more detailed information.
14+
5. **Manual Flushing**: If you are using short-lived applications like serverless functions, ensure that you are manually flushing the events before the application exits. This is important to avoid losing events. Read more on this [here](/docs/tracing).
15+
6. **Network Issues**: Check for any network issues that might be preventing your application from sending data to Langfuse. Ensure that your firewall or network settings allow outbound connections to Langfuse endpoints.
16+
7. **Batching Configuration**: In high throughput applications, verify the batching configuration to ensure that events are being sent in a timely manner. You can adjust the `flushAt` and `flushInterval` settings to suit your needs.
17+
18+
By following these steps, you should be able to identify and resolve the issue preventing traces from appearing in the Langfuse dashboard. If you continue to have issues, please [reach out](/support), we are happy to help.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Can I deploy multiple instances of Langfuse behind a load balancer?
3+
tags: [self-hosting]
4+
---
5+
6+
# Can I deploy multiple instances of Langfuse behind a load balancer?
7+
8+
Yes, you can deploy multiple instances of Langfuse behind a load balancer as the application itself is entirely stateless and depends on a single database. Make sure that your database is configured to handle the number of connections.

pages/faq/index.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Collection of frequently asked questions about Langfuse.
3+
---
4+
5+
# FAQ
6+
7+
<Callout type="info">
8+
The FAQ section is work-in-progress. Please ask new questions via [GitHub
9+
Discussions](/gh-support).
10+
</Callout>
11+
12+
import { FaqIndex } from "@/components/faq/FaqIndex";
13+
14+
<FaqIndex />

pages/faq/tag/Readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- This folder has both the [tag] and usual pages. [tag] technically works SSR (build time) for all tags that exist in /all, but they do not render in the main menu. Thus we can copy paste the tag page for all tags that should show up in the main menu.

0 commit comments

Comments
 (0)