Skip to content

docs: add AG2, AgentGateway, and Genkit integration pages (community PRs, review fixes applied)#3244

Draft
jannikmaierhoefer wants to merge 3 commits into
mainfrom
claude/nice-babbage-bt8qu4
Draft

docs: add AG2, AgentGateway, and Genkit integration pages (community PRs, review fixes applied)#3244
jannikmaierhoefer wants to merge 3 commits into
mainfrom
claude/nice-babbage-bt8qu4

Conversation

@jannikmaierhoefer

@jannikmaierhoefer jannikmaierhoefer commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adopts three community integration-page PRs that could not be updated in place (fork branches, two of them targeting the removed pages/ tree), with review fixes applied. Original authors are credited via Co-authored-by on each commit — one commit per integration.

Included integrations

Genkit (supersedes #2701 by @dmeremyanin)

  • Registered genkit in content/integrations/frameworks/meta.json (the PR's meta.json hunk conflicted with main)
  • Logomark SVG now uses currentColor so it is visible in dark mode
  • Removed unused fmt import from the Go example (compile error)
  • Sentence case for "Next steps" heading

AG2 (supersedes #2632 by @VasiliyRad)

  • Moved page from the removed pages/ tree to content/integrations/frameworks/ag2.mdx (it would never have rendered)
  • Registered ag2 in the frameworks sidebar meta.json
  • Added the official AG2 logo (ag2_icon.svg, from the ag2ai/ag2 repo, currentColor)
  • Fixed broken link /docs/integrations/native/opentelemetry/integrations/native/opentelemetry
  • %pip magic → pip install in a bash fence
  • Added AutoGen/AG2 cross-link callout; made the A2A example self-contained; updated the A2A protocol link; sentence-case headings; import os added to the exporter snippet

AgentGateway (supersedes #2550 by @sebbycorp)

  • Moved page from the removed pages/ tree to content/integrations/gateways/agentgateway.mdx
  • Registered agentgateway in the gateways sidebar meta.json
  • Added the official AgentGateway icon (frontmatter previously pointed at a nonexistent solo_icon.png)
  • Fixed stale links (/docs/integrations/otel/integrations/native/opentelemetry, self-hosting link)
  • Updated token attributes to current GenAI semconv (gen_ai.usage.input_tokens/output_tokens)
  • Corrected the metadata section: headers must be mapped to langfuse.user.id/langfuse.session.id to drive user/session tracking (plain x-* attributes do not)
  • Trimmed undemonstrated feature claims

Checks

  • node scripts/check-h1-headings.js passes
  • prettier --check passes on all changed files
  • Internal link targets verified against the current repo (/integrations/native/opentelemetry, /integrations/frameworks/autogen, /self-hosting, /docs/observability/features/users, /docs/observability/features/sessions)

Notes for maintainers

🤖 Generated with Claude Code

https://claude.ai/code/session_01AucK6Q8Hf4u4ffEo5KRj9m


Generated by Claude Code

Greptile Summary

This PR adopts three community integration pages — AG2, AgentGateway, and Genkit — that were either targeting the removed pages/ tree or could not be updated in place, with review fixes applied by the maintainer.

  • AG2 (content/integrations/frameworks/ag2.mdx): New page for AG2 v0.11+ native OpenTelemetry tracing. Covers basic setup, tool-use, group-chat, distributed A2A tracing, and an env-var alternative. Code examples are self-contained and the AutoGen cross-link callout is accurate.
  • AgentGateway (content/integrations/gateways/agentgateway.mdx): New page for routing LLM traffic through AgentGateway with Langfuse observability via an OTEL Collector. Kubernetes manifests, GenAI semconv field mappings, and user/session metadata sections all look correct.
  • Genkit (content/integrations/frameworks/genkit.mdx): New page for sending Go Genkit OTLP traces to Langfuse. The Go module path (github.com/xavidop/genkit-opentelemetry-go) and the GitHub docs link (genkit-ai/opentelemetry-go-plugin) refer to the same project (different repo alias — verified). The meta.json sidebar registrations and SVG icon files are also included.

Confidence Score: 4/5

Safe to merge; the one finding is a cosmetic SVG color that doesn't affect functionality.

Three well-written documentation pages with accurate code examples, corrected links, and working sidebar registrations. The only gap is that the AgentGateway icon retains hardcoded brand colors instead of currentColor, so it won't participate in theme switching the way the AG2 and Genkit icons do — a cosmetic inconsistency introduced in this same PR.

public/images/integrations/agentgateway_icon.svg — hardcoded fill="#7734be" on all path elements should be fill="currentColor" to match the other icons.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph AG2
        A1[AG2 Agents] -->|instrument_agent / instrument_pattern| A2[OTel TracerProvider]
        A2 -->|BatchSpanProcessor| A3[OTLPSpanExporter HTTP]
        A3 --> LF[Langfuse /api/public/otel/v1/traces]
    end

    subgraph Genkit_Go
        G1[Genkit Flows] -->|genkit-opentelemetry-go plugin| G2[OTLPSpanExporter HTTP]
        G2 --> LF
    end

    subgraph AgentGateway
        C1[AI Agent] -->|HTTP| GW[AgentGateway]
        GW -->|OTel spans| OC[OTEL Collector]
        OC -->|otlphttp export| LF
        GW -->|proxied request| LLM[LLM Provider]
    end

    LF[Langfuse Traces UI]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph AG2
        A1[AG2 Agents] -->|instrument_agent / instrument_pattern| A2[OTel TracerProvider]
        A2 -->|BatchSpanProcessor| A3[OTLPSpanExporter HTTP]
        A3 --> LF[Langfuse /api/public/otel/v1/traces]
    end

    subgraph Genkit_Go
        G1[Genkit Flows] -->|genkit-opentelemetry-go plugin| G2[OTLPSpanExporter HTTP]
        G2 --> LF
    end

    subgraph AgentGateway
        C1[AI Agent] -->|HTTP| GW[AgentGateway]
        GW -->|OTel spans| OC[OTEL Collector]
        OC -->|otlphttp export| LF
        GW -->|proxied request| LLM[LLM Provider]
    end

    LF[Langfuse Traces UI]
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
public/images/integrations/agentgateway_icon.svg:1-12
**Hardcoded brand color prevents dark-mode rendering**

Every `<path>` uses `fill="#7734be"` (a hardcoded purple). Both other icons added in this PR (`ag2_icon.svg` uses `fill="currentColor"`, `genkit_icon.svg` uses `stroke="currentColor"` / `fill="currentColor"`) adapt to the site theme. The PR description even calls out the Genkit fix: *"Logomark SVG now uses `currentColor` so it is visible in dark mode"* — but the same change was not applied here. Replace all `fill="#7734be"` with `fill="currentColor"` to match the other icons.

Reviews (1): Last reviewed commit: "docs: add AgentGateway integration page ..." | Re-trigger Greptile

claude and others added 3 commits July 6, 2026 09:56
Adds the Genkit (Go) OpenTelemetry integration page by @dmeremyanin with
review fixes: register the page in the frameworks sidebar meta.json,
render the logomark with currentColor so it is visible in dark mode,
remove an unused import from the Go example, and use sentence case for
headings.

Co-authored-by: DM <deemox@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AucK6Q8Hf4u4ffEo5KRj9m
Adds the AG2 native OpenTelemetry integration page by @VasiliyRad with
review fixes: move the page from the removed pages/ tree to
content/integrations/frameworks/, register it in the sidebar meta.json,
add the official AG2 logo as an icon, fix the OpenTelemetry docs link,
use a bash fence for pip install, cross-link the AutoGen page, make the
A2A example self-contained, and use sentence case for headings.

Co-authored-by: Vasiliy Radostev <vasiliy@live.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AucK6Q8Hf4u4ffEo5KRj9m
Adds the AgentGateway (Kubernetes gateway) integration page by
@sebbycorp with review fixes: move the page from the removed pages/
tree to content/integrations/gateways/, register it in the sidebar
meta.json, add the official AgentGateway icon, fix stale Langfuse doc
links, use current GenAI semconv token attribute names, and correct the
user/session metadata guidance to map headers to langfuse.user.id and
langfuse.session.id.

Co-authored-by: Sebastian Maniak <sebastian@maniak.io>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AucK6Q8Hf4u4ffEo5KRj9m
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 6, 2026
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
langfuse-docs Ready Ready Preview, Comment Jul 6, 2026 10:01am

Request Review

@dosubot dosubot Bot added the documentation Improvements or additions to documentation label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

@claude review

Comment on lines +22 to +28
## Step 1: Install the Genkit OpenTelemetry plugin

```bash
go get github.com/xavidop/genkit-opentelemetry-go
```

The package is documented in the [`genkit-ai/opentelemetry-go-plugin` repository](https://github.com/genkit-ai/opentelemetry-go-plugin).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 The Callout (line 18) and prose (line 28) both link to github.com/genkit-ai/opentelemetry-go-plugin as the documented plugin, but the go get command (line 25) and Go import (line 54) use github.com/xavidop/genkit-opentelemetry-go — a different owner and repository name. A reader clicking the linked repo will land on a package whose install/API instructions don't match the code snippets. Please reconcile by either updating the code to use the linked module, or updating both prose links to point at github.com/xavidop/genkit-opentelemetry-go.

Extended reasoning...

The bug. content/integrations/frameworks/genkit.mdx contains an internal inconsistency between the documentation prose and the code snippets. Two prose references point readers at one Go module while the code snippets install and import a completely different Go module:

Why this is a real problem. In Go, the module path IS the package identity — github.com/genkit-ai/opentelemetry-go-plugin and github.com/xavidop/genkit-opentelemetry-go are two distinct packages with different owners and different repository names (not just an org rename — the repo name itself changes from opentelemetry-go-plugin to genkit-opentelemetry-go). They cannot both refer to the same package.

Impact on the reader. This is the very first step of the integration (Step 1: Install the Genkit OpenTelemetry plugin). A reader who follows the prose link lands on genkit-ai/opentelemetry-go-plugin's README and gets install/config instructions that reference a different import path than the code snippets in this same guide. A reader who follows the code snippet installs xavidop/genkit-opentelemetry-go, then clicks the doc link and finds themselves reading docs for a package they never installed. Either path is broken.

Step-by-step proof.

  1. Reader opens the Genkit integration page.
  2. Reader reads the Callout on line 18 and clicks "Genkit OpenTelemetry plugin" → lands on https://github.com/genkit-ai/opentelemetry-go-plugin.
  3. Reader returns to the guide and runs go get github.com/xavidop/genkit-opentelemetry-go from line 25 — this pulls a different module (different owner, different repo).
  4. Reader clicks the prose link on line 28 ("documented in the genkit-ai/opentelemetry-go-plugin repository") → lands again on genkit-ai/opentelemetry-go-plugin, whose README describes a different import path and possibly a different API surface than the xavidop/... module the reader just installed.
  5. Reader copies the Go code from Step 3 (line 54: opentelemetry "github.com/xavidop/genkit-opentelemetry-go") — the import matches what was installed, but the reader has no docs for it because both prose links point elsewhere.

Why this wasn't caught. The PR description itself flags Genkit content as "as written by the original authors — worth a quick spot-check," indicating the maintainer already suspected this area needed verification.

Fix. Pick one authoritative source and align both sides. If xavidop/genkit-opentelemetry-go is the correct package (matching what the code imports), update the Callout on line 18 and the prose on line 28 to link there instead. If genkit-ai/opentelemetry-go-plugin is the correct package (matching the prose links), update the go get on line 25 and the import alias on line 54 to that module path.

Comment on lines +262 to +266
```bash
export OTEL_EXPORTER_OTLP_ENDPOINT="https://cloud.langfuse.com/api/public/otel"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic $(echo -n 'pk-lf-...:sk-lf-...' | base64)"
export OTEL_SERVICE_NAME="ag2-app"
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Two new bash snippets pipe the pk:sk pair through base64 without -w0: ag2.mdx:264 (OTEL_EXPORTER_OTLP_HEADERS) and agentgateway.mdx:63 (LANGFUSE_AUTH). GNU coreutils base64 wraps at 76 chars, and real Langfuse keys (pk-lf-<UUID>:sk-lf-<UUID>, ~85 chars → ~116 chars encoded) cross that threshold — the embedded newline survives $(...) (which only strips trailing newlines) and corrupts the Authorization header, causing silent 401s on Linux. Suggest adopting the pattern already documented in content/integrations/frameworks/spring-ai.mdx:213-214 (base64 -w0 on Linux with a macOS-BSD fallback comment).

Extended reasoning...

What is wrong

This PR adds two new bash snippets that base64-encode a Langfuse public_key:secret_key pair without disabling GNU base64's default line-wrapping:

  • content/integrations/frameworks/ag2.mdx:264 — sets OTEL_EXPORTER_OTLP_HEADERS inline
  • content/integrations/gateways/agentgateway.mdx:63 — sets LANGFUSE_AUTH for later use in a YAML manifest

Both use the form $(echo -n "…" | base64) with no -w0.

Step-by-step proof (Linux, real Langfuse cloud keys)

  1. Cloud keys are UUID-suffixed: pk-lf-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX (42 chars) and sk-lf-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX (42 chars).
  2. Joined with :85 characters of input.
  3. Base64 of 85 bytes → ceil(85/3)*4 = 116 characters of output.
  4. GNU coreutils base64 defaults to --wrap=76, so it inserts a literal LF after column 76.
  5. Bash $(...) command substitution strips only trailing newlines from the captured stdout — an LF at position 77 stays inside the string.
  6. For agentgateway.mdx: LANGFUSE_AUTH now contains <76 chars>\n<40 chars>, which is pasted into the Collector YAML as Authorization: "Basic <broken>" → OTLP server sees a malformed credential → 401.
  7. For ag2.mdx: OTEL_EXPORTER_OTLP_HEADERS gets an embedded LF. HTTP header values cannot contain raw LF; the OTLP HTTP client either rejects the header or transmits a truncated one → 401.
  8. The placeholder pk-lf-...:sk-lf-... shown in the docs is only 19 chars (28 encoded), so testing with the literal placeholder does NOT trigger the wrap — the bug is invisible until a reader plugs in real keys.

Why existing code does not prevent it

There is no runtime guard — the docs are copy-pasted verbatim by readers. The failure mode is silent (auth error, no hint that the credential is malformed) and specific to Linux (BSD base64 on macOS does not wrap), which is the majority CI/dev environment.

The repo already documents the fix

content/integrations/frameworks/spring-ai.mdx:213-214 spells out the correct cross-platform pattern:

export AUTH_STRING=$(echo -n "pk-lf-...:sk-lf-..." | base64 -w0) # Linux
# macOS (BSD base64 has no -w0): export AUTH_STRING=$(echo -n "pk-lf-...:sk-lf-..." | base64)

The explicit # Linux / # macOS (BSD base64 has no -w0) comments are a direct acknowledgment that the maintainers have already been bitten by this. github-copilot.mdx and other/openclaw.mdx use the same pattern.

Suggested fix

Adopt the spring-ai pattern in both new files: append -w0 to the base64 call and add a one-line macOS fallback comment. This is a one-character diff per file.

Severity note

Marking as nit because several pre-existing docs (amazon-agentcore.mdx, pipecat.mdx, vscode.mdx, existing-otel-setup.mdx, and agentgateway.mdx's own troubleshooting row at line 425) use the same non-wrapping-safe pattern, so this PR extends a pre-existing inconsistency rather than introducing a new one. It is still worth fixing on the way in — the correct pattern is one directory over in spring-ai.mdx, and following the wrong pattern here causes a real silent-auth failure for readers who paste the snippet with real UUID keys.

@jannikmaierhoefer jannikmaierhoefer marked this pull request as draft July 6, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants