> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # Braintrust수출업체 평가 및 Observability을 위해 추적 데이터를 Braintrust로 보냅니다. ## 건설자 ```typescript new BraintrustExporter(config: BraintrustExporterConfig) ``` ## `BraintrustExporterConfig` ```typescript interface BraintrustExporterConfig extends BaseExporterConfig { apiKey?: string endpoint?: string projectName?: string braintrustLogger?: Logger currentSpan?: () => Span | undefined tuningParameters?: Record } ``` `BaseExporterConfig`를 확장하며, 포함되는 항목은 다음과 같습니다. - `logger?: IMastraLogger`- 로거 인스턴스 - `logLevel?: LogLevel | 'debug' | 'info' | 'warn' | 'error'`- 로그 수준(기본값: INFO) ## 행동 양식 ### `exportTracingEvent` ```typescript async exportTracingEvent(event: TracingEvent): Promise ``` 추적 이벤트를 Braintrust로 내보냅니다. ### 내보내다 ```typescript async export(spans: ReadOnlySpan[]): Promise ``` 일괄 내보내기는 Braintrust로 범위를 내보냅니다. ### 플러시 ```typescript async flush(): Promise ``` Force는 내보내기를 종료하지 않고 모든 버퍼링된 범위를 Braintrust로 플러시합니다. 런타임이 종료되기 전에 범위를 내보내야 하는 서버리스 환경에 유용합니다. ### 일시 휴업 ```typescript async shutdown(): Promise ``` 보류 중인 데이터를 플러시하고 클라이언트를 종료합니다. ## 용법 ### Zero-Config(환경 변수 사용) ```typescript import { BraintrustExporter } from '@mastra/braintrust' // Reads from BRAINTRUST_API_KEY, BRAINTRUST_ENDPOINT const exporter = new BraintrustExporter() ``` ### 명시적 구성 ```typescript import { BraintrustExporter } from '@mastra/braintrust' const exporter = new BraintrustExporter({ apiKey: process.env.BRAINTRUST_API_KEY, projectName: 'my-ai-project', }) ``` ## 스팬 유형 매핑 | 스팬 유형 | 브레인트러스트 유형 | | --------------------------- | ---------- | | `MODEL_GENERATION` | `llm` | | `MODEL_CHUNK` | `llm` | | `TOOL_CALL` | `tool` | | `MCP_TOOL_CALL` | `tool` | | `PROVIDER_TOOL_CALL` | `tool` | | `WORKFLOW_CONDITIONAL_EVAL` | `function` | | `WORKFLOW_WAIT_EVENT` | `function` | | 기타 모든 | `task` |