프로젝트 수준의 OTLP 추적 내보내기 설정을 저장합니다. 인증 비밀은 (headers_secret_ref)만 참조됩니다. 원시 값은 허용되거나 저장되지 않습니다. 세대 카운터를 증가시킴고 하위 전달을 위해 구성을 대기 중으로 표시합니다. 프로젝트 범위는 경로 ID 경로 매개변수를 통해 전달되며, 조직은 해당 프로젝트에서 파생됩니다.
body
필수 사항
타입화된 JSON 구성
-
ContentMode는 스팬 콘텐츠 편집을 선택합니다. 빈 값은 메타데이터 전용입니다.
값은
metadata_only또는full입니다. -
EgressMode는 스팬이 전달되는 위치를 선택합니다. 공백은 플랫폼 전용을 의미합니다.
값은
platform_only,platform_and_customer_mirror또는customer_only입니다. -
활성화 여부는 포인터이므로, 핸들러는 생략된 필드(nil, 거부됨)와 명시적인 false(유효한 "내보내기 비활성화" 요청)를 구분할 수 있습니다.
-
엔드포인트는 고객의 OTLP/HTTP 엔드포인트입니다. 활성화된 경우 필수입니다. HTTPS여야 하며 내부/루프백 주소를 점으로 지정하지 않아야 합니다(유효성 검사 참조).
최대 길이는
2048입니다. -
헤더에는 사전 설정에 필요한 비공개 수출 헤더(예: 워크스페이스 ID)가 포함됩니다. 비밀 값은 여기에 절대 입력하면 안 됩니다. HeadersSecretRef를 사용하십시오.
-
HeadersSecretRef는 단일 저장된 인증 시크릿(일반적으로 API 키)의 포인터입니다. 참조입니다. 비밀 값은 절대 아닙니다. 호출자의 프로젝트로 범위가 지정되어야 합니다(검증 참조).
최대 길이는
512입니다. -
InsecureSkipVerify 는 고객 엔드포인트의 TLS 검증을 비활성화합니다. 포인터가 nil이다(검증, 기본값)는 명시적인 사용 거부와는 다름니다. UI에서는 이를 활성화하는 것을 보안을 고의적으로 줄이는 것으로 표시합니다.
-
프로토콜은 아웃바운드 OTLP 프로토콜입니다. v1는 HTTP/Protobuf만 지원합니다.
값은
http/protobuf입니다. -
리소스Attributes는 고객 엔드포인트로 전송되는 모든 스팬에 스탬프 처리되는 예비 OTLP 리소스 특성입니다(예: 대상에서 필요한 프로젝트/모델 식별자). 주어진 대상이 필요로 하는 키는 해당 대상의 사전 설정에서 오는 것입니다(pkg/traceexportconfig/presets 참조). 값은 항상 고객이 제공합니다. 이는 일반적으로 대상의 측에 있는 프로젝트의 이름을 지정하기 때문이며, 이 플랫폼에서는 조회할 수 없습니다.
-
SamplingPolicy는 내보내기 전에 적용되는 헤드 샘플러를 선택합니다.
-
SecretHeaderName은 참조된 비밀의 값이 전송되는 헤더 이름입니다(예: `"`api_key`"`), 사전 설정의 secret_header_keys에서 가져오거나 사용자가 사용자 지정 대상에 대해 입력한 것입니다. 플랫포림은 외부 ": " 헤더 줄을 구성하므로, 저장된 시크릿은 항상 원시 값입니다(사전 형식화된 헤더 줄이 아닙니다). HeadersSecretRef가 설정된 경우 필수입니다(Validate 참조).
최대 길이는
128입니다.
curl \
--request PUT 'https://agentengine.mongodb.com/api/v1/projects/{id}/trace-export/config' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"content_mode": "metadata_only",
"egress_mode": "platform_only",
"enabled": true,
"endpoint": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"headers_secret_ref": "string",
"insecure_skip_verify": true,
"protocol": "http/protobuf",
"resource_attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"sampling_policy": {
"ratio": 42.0,
"type": "always_on"
},
"secret_header_name": "string"
}'
{
"content_mode": "metadata_only",
"egress_mode": "platform_only",
"enabled": true,
"endpoint": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"headers_secret_ref": "string",
"insecure_skip_verify": true,
"protocol": "http/protobuf",
"resource_attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"sampling_policy": {
"ratio": 42.0,
"type": "always_on"
},
"secret_header_name": "string"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"generation": 42,
"updated_at": "string"
}
{
"generation": 42,
"updated_at": "string"
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}