mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 13:18:10 +00:00
* feat: adopt directory-based docs versioning with Edge channel Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com> * style: resolve linter issues --------- Co-authored-by: Cursor <cursoragent@cursor.com>
110 lines
4.6 KiB
Plaintext
110 lines
4.6 KiB
Plaintext
---
|
|
title: Datadog 통합
|
|
description: Datadog을 CrewAI와 통합하여 LLM Observability 트레이스들을 Datadog에 제출하는 방법을 알아보세요.
|
|
icon: dog
|
|
mode: "wide"
|
|
---
|
|
|
|
# Datadog을 CrewAI와 통합하기
|
|
|
|
이 가이드에서는 Datadog 자동 계측을 사용하여 **Datadog**을 **CrewAI**와 통합하는 방법을 보여드립니다. 이 가이드가 끝나면 LLM Observability 트레이스를 Datadog에 제출하고 CrewAI 에이전트 실행을 Datadog LLM Observability의 에이전트 실행 보기에서 볼 수 있게 됩니다.
|
|
|
|
## Datadog LLM Observability란 무엇인가요?
|
|
|
|
[Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)는 AI 엔지니어, 데이터 과학자, 애플리케이션 개발자가 LLM 애플리케이션을 신속하게 개발, 평가, 모니터링할 수 있도록 도와줍니다. 구조화된 실험, AI 에이전트 전반의 엔드투엔드 추적, 평가를 통해 결과물 품질, 성능, 비용, 전반적인 위험을 확실하게 개선할 수 있습니다.
|
|
|
|
## 시작하기
|
|
|
|
### 설치 종속성
|
|
|
|
```shell
|
|
pip install ddtrace crewai crewai-tools
|
|
```
|
|
|
|
### 환경 변수 설정하기
|
|
|
|
Datadog API 키가 없는 경우, [계정 만들기](https://www.datadoghq.com/) 및 [API 키 받기](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys)를 할 수 있습니다.
|
|
|
|
또한 다음 환경 변수에 ML 애플리케이션 이름을 지정해야 합니다. ML 애플리케이션은 특정 LLM 기반 애플리케이션과 관련된 LLM Observability 트레이스의 그룹입니다. ML 애플리케이션 이름 제한에 대한 자세한 내용은 [ML 애플리케이션 이름 지정 가이드라인](https://docs.datadoghq.com/llm_observability/instrumentation/sdk?tab=python#application-naming-guidelines)을 참조하세요.
|
|
|
|
```shell
|
|
export DD_API_KEY=<YOUR_DD_API_KEY>
|
|
export DD_SITE=<YOUR_DD_SITE>
|
|
export DD_LLMOBS_ENABLED=true
|
|
export DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME>
|
|
export DD_LLMOBS_AGENTLESS_ENABLED=true
|
|
export DD_APM_TRACING_ENABLED=false
|
|
```
|
|
|
|
또한 LLM 공급자 API 키를 설정합니다.
|
|
|
|
```shell
|
|
export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
|
|
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>
|
|
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
|
|
...
|
|
```
|
|
|
|
### 크루AI 에이전트 애플리케이션 생성하기
|
|
|
|
```python
|
|
# crewai_agent.py
|
|
from crewai import Agent, Task, Crew
|
|
|
|
from crewai_tools import (
|
|
WebsiteSearchTool
|
|
)
|
|
|
|
web_rag_tool = WebsiteSearchTool()
|
|
|
|
writer = Agent(
|
|
role="작가",
|
|
goal="시를 통해 어린이들이 수학을 흥미롭고 이해하기 쉽게 설명합니다",
|
|
backstory="당신은 하이쿠를 쓰는 전문가이지만 수학은 전혀 모릅니다.",
|
|
tools=[web_rag_tool],
|
|
)
|
|
|
|
task = Task(
|
|
description=("{곱셈}이란 무엇인가요?"),
|
|
expected_output=("답을 포함하는 하이쿠를 작성하세요."),
|
|
agent=writer
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[writer],
|
|
tasks=[task],
|
|
share_crew=False
|
|
)
|
|
|
|
output = crew.kickoff(dict(곱셈="2 * 2"))
|
|
```
|
|
|
|
### Datadog 자동 계측을 사용하여 애플리케이션 실행하기
|
|
|
|
[환경 변수](#환경-변수-설정하기)를 설정하면 이제 Datadog 자동 계측을 통해 애플리케이션을 실행할 수 있습니다.
|
|
|
|
```shell
|
|
ddtrace-run python crewai_agent.py
|
|
```
|
|
|
|
### Datadog에서 트레이스 추적하기
|
|
|
|
애플리케이션을 실행한 후 왼쪽 상단 드롭다운에서 선택한 ML 애플리케이션 이름을 선택하면 [Datadog LLM Observability의 트레이스 보기](https://app.datadoghq.com/llm/traces)에서 트레이스들을 확인할 수 있습니다.
|
|
|
|
트레이스를 클릭하면 사용된 총 토큰, LLM 호출 수, 사용된 모델, 예상 비용 등 트레이스에 대한 세부 정보가 표시됩니다. 특정 스팬(span)을 클릭하면 이러한 세부 정보의 범위가 좁혀지고 관련 입력, 출력 및 메타데이터가 표시됩니다.
|
|
|
|
<Frame>
|
|
<img src="/images/datadog-llm-observability-1.png" alt="Datadog LLM 옵저버빌리티 추적 보기" />
|
|
</Frame>
|
|
|
|
또한, 트레이스의 제어 및 데이터 흐름을 보여주는 트레이스의 실행 그래프 보기를 볼 수 있으며, 이는 더 큰 에이전트로 확장하여 LLM 호출, 도구 호출 및 에이전트 상호 작용 간의 핸드오프와 관계를 보여줍니다.
|
|
|
|
<Frame>
|
|
<img src="/images/datadog-llm-observability-2.png" alt="Datadog LLM Observability 에이전트 실행 흐름 보기" />
|
|
</Frame>
|
|
|
|
## 참조
|
|
|
|
- [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)
|
|
- [Datadog LLM 옵저버빌리티 크루AI 자동 계측](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#crew-ai)
|