기록된 이벤트

GitLab Rails Monolith 인스턴스의 표준 로깅 외에도, 대규모 언어 모델(LLM)을 기반으로 하는 기능에 대한 전문 로깅이 제공됩니다.

기록된 이벤트

서비스로부터의 반환(유효성 검사로 인한)

  • 설명: 사용자가 작업을 수행할 수 없음
  • 클래스: Llm::BaseService
  • Ai_event_name: permission_denied
  • 레벨: 정보
  • 인수:
    • 없음
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 아니오
  • Rails: 예
  • Sidekiq: 아니오

CompletionWorker 대기열 추가

  • 설명: Sidekiq에서 완료 작업자를 예약합니다.
  • 클래스: Llm::BaseService
  • Ai_event_name: worker_enqueued
  • 레벨: 정보
  • 인수:
    • user_id: message.user.id
    • resource_id: message.resource&.id
    • resource_class: message.resource&.class&.name
    • request_id: message.request_id
    • action_name: message.ai_action
    • options: job_options
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 예
  • Rails: 예
  • Sidekiq: 아니오

중단: 리소스 누락

  • 설명: 슬래시 명령에 대한 리소스가 없는 경우
  • 클래스: Llm::ChatService
  • Ai_event_name: missing_resource
  • 레벨: 정보
  • 인수:
    • 없음
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 아니오
  • Rails: 예
  • Sidekiq: 아니오

CompletionService 수행

  • 설명: 완료를 수행합니다.
  • 클래스: Llm::Internal::CompletionService
  • Ai_event_name: completion_service_performed
  • 레벨: 정보
  • 인수:
    • user_id: prompt_message.user.to_gid
    • resource_id: prompt_message.resource&.to_gid
    • action_name: prompt_message.ai_action
    • request_id: prompt_message.request_id
    • client_subscription_id: prompt_message.client_subscription_id
    • completion_service_name: completion_class_name
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

LLM 응답에서의 답변

  • 설명: 응답에서 답변을 가져옵니다.
  • 클래스: Gitlab::Llm::Chain::Answer
  • Ai_event_name: answer_received
  • 레벨: 정보
  • 인수:
    • llm_answer_content: content
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

최종 답변

  • 설명: 응답에서 최종 답변을 가져옵니다.
  • 클래스: Gitlab::Llm::Chain::Answer
  • Ai_event_name: final_answer_received
  • 레벨: 정보
  • 인수:
    • llm_answer_content: content
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

기본 최종 답변

  • 설명: 기본 최종 답변: 죄송합니다, 제때 응답할 수 없었습니다. 보다 구체적인 요청을 해 보시거나 /clear를 입력하여 새 채팅을 시작하세요.
  • 클래스: Gitlab::Llm::Chain::Answer
  • Ai_event_name: default_final_answer_received
  • 레벨: 정보
  • 인수:
    • error_code: “A6000”
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

오류 메시지/ “오류”

  • 설명: 오류로 응답할 때
  • 클래스: Gitlab::Llm::Chain::Answer
  • Ai_event_name: error_returned
  • 레벨: error
  • 인수:
    • error: content
    • error_code: error_code
    • source: source
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

AI 게이트웨이에서 받은 응답

  • 설명: AIGW의 응답이 반환될 때
  • 클래스: Gitlab::Llm::AiGateway::Client
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • response_from_llm: response_body
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

AI 게이트웨이에서 받은 오류

  • 설명: 스트리밍 명령에 대해 AIGW에서 오류가 반환될 때
  • 클래스: Gitlab::Llm::AiGateway::Client
  • Ai_event_name: error_response_received
  • 레벨: error
  • 인수:
    • response_from_llm: parsed_response.dig(‘detail’
    • 0
    • ‘msg’)
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

AI 게이트웨이에 요청 수행 중

  • 설명: AI GW에 요청을 수행하기 전
  • 클래스: Gitlab::Llm::AiGateway::Client
  • Ai_event_name: performing_request
  • 레벨: info
  • 인수:
    • url: url
    • body: body
    • timeout: timeout
    • stream: stream
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

사용자 액세스 토큰 생성

  • 설명: AIGW에서 단기 토큰 생성
  • 클래스: Gitlab::Llm::AiGateway::CodeSuggestionsClient
  • Ai_event_name: user_token_created
  • 레벨: info
  • 인수:
    • none
  • 시스템의 일부: code suggestions
  • 확장된 로깅?: no
  • Rails: yes
  • Sidekiq: no

Anthropic에서 받은 응답

  • 설명: 응답 수신
  • 클래스: Gitlab::Llm::Anthropic::Client
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • ai_request_type: request_type
    • unit_primitive: unit_primitive
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

응답 내용

  • 설명: 응답의 내용
  • 클래스: Gitlab::Llm::Anthropic::Client
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • ai_request_type: request_type
    • unit_primitive: unit_primitive
    • response_from_llm: response_body
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

Anthropic에 요청 수행

  • 설명: 완성 요청 수행
  • 클래스: Gitlab::Llm::Anthropic::Client
  • Ai_event_name: performing_request
  • 레벨: info
  • 인수:
    • options: options
    • ai_request_type: request_type
    • unit_primitive: unit_primitive
  • 시스템의 일부: abstraction_layer
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

AI 게이트웨이에서 문서 검색

  • 설명: 문서 검색 요청 수행
  • 클래스: Gitlab::Llm::AiGateway::DocsClient
  • Ai_event_name: performing_request
  • 레벨: info
  • 인수:
    • options: options
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

AI 게이트웨이에서 검색된 문서 내용

  • 설명: 문서와 함께 AIGW로부터의 응답
  • 클래스: Gitlab::Llm::AiGateway::DocsClient
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • response_from_llm: response
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: yes
  • Rails: no
  • Sidekiq: yes

질문 범주화 중 JSON 파싱 오류

  • 설명: JSON이 파싱할 수 없을 때 기록됨
  • 클래스: Gitlab::Llm::Anthropic::Completions::CategorizeQuestions
  • Ai_event_name: error
  • 레벨: error
  • 인수:
    • none
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

정의된 범주를 포함하지 않은 응답

  • 설명: 응답이 정의된 범주 중 하나를 포함하지 않을 때 기록됨
  • 클래스: Gitlab::Llm::Anthropic::Completions::CategorizeQuestions
  • Ai_event_name: error
  • 레벨: error
  • 인수:
    • none
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

질문 범주화 중 수신된 오류 응답

  • 설명: 반환된 응답이 성공적이지 않을 때 기록됨
  • 클래스: Gitlab::Llm::Anthropic::Completions::CategorizeQuestions
  • Ai_event_name: error
  • 레벨: error
  • 인수:
    • error_type: response.dig(‘error’, ‘type’)
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

선택된 도구

  • 설명: 채팅에서 선택된 도구에 대한 정보
  • 클래스: Gitlab::Llm::Chain::Agents::ZeroShot::Executor
  • Ai_event_name: picked_tool
  • 레벨: info
  • 인수:
    • duo_chat_tool: tool_class.to_s
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

AI 클라이언트에 요청 전송

  • 설명: 채팅 요청하기
  • 클래스: Gitlab::Llm::Chain::Requests::AiGateway
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • prompt: prompt[:prompt]
    • response_from_llm: response
    • unit_primitive: unit_primitive
  • 시스템의 일부: duo_chat
  • 확장 로깅 여부?: yes
  • Rails: no
  • Sidekiq: yes

스트리밍 오류

  • 설명: 스트리밍 중 반환된 오류
  • 클래스: Gitlab::Llm::Chain::Requests::Anthropic
  • Ai_event_name: error_response_received
  • 레벨: error
  • 인수:
    • error: data&.dig(“error”)
  • 시스템의 일부: abstraction_layer
  • 확장 로깅 여부?: no
  • Rails: no
  • Sidekiq: yes

문서 질문 콘텐츠에 대한 최종 결과

  • 설명: 문서 질문에 대한 결과를 얻었습니다 - 콘텐츠
  • 클래스: Gitlab::Llm::Chain::Tools::EmbeddingsCompletion
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • prompt: final_prompt[:prompt]
    • response_from_llm: final_prompt_result
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

스트리밍 오류

  • 설명: 문서 질문의 스트리밍 명령에 대해 AIGW에서 오류가 반환될 때
  • 클래스: Gitlab::Llm::Chain::Tools::EmbeddingsCompletion
  • Ai_event_name: error_response_received
  • 레벨: error
  • 인수:
    • error: error.message
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

도구에서 이미 답변을 받았습니다

  • 설명: 도구가 이미 선택되었을 때 (콘텐츠: You already have the answer from #{self.class::NAME} tool, read carefully.)
  • 클래스: Gitlab::Llm::Chain::Tools::Tool
  • Ai_event_name: incorrect_response_received
  • 레벨: info
  • 인수:
    • error_message: content
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

도구 순환 감지됨

  • 설명: 도구가 다시 선택되었을 때
  • 클래스: Gitlab::Llm::Chain::Tools::Tool
  • Ai_event_name: incorrect_response_received
  • 레벨: info
  • 인수:
    • picked_tool: cls.class.to_s
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

TanukiBot 호출

  • 설명: 문서 요청 수행
  • 클래스: Gitlab::Llm::Chain::Tools::GitlabDocumentation::Executor
  • Ai_event_name: documentation_question_initial_request
  • 레벨: info
  • 인수:
    • none
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

#{resource_name} 찾기 오류

  • 설명: 리소스 (이슈/에픽/MR)를 찾을 수 없을 때
  • 클래스: Gitlab::Llm::Chain::Tools::Identifier
  • Ai_event_name: incorrect_response_received
  • 레벨: error
  • 인수:
    • error_message: authorizer.message
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

LLM에서 받은 답변

  • 설명: 식별자로부터의 응답
  • 클래스: Gitlab::Llm::Chain::Tools::Identifier
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • response_from_llm: content
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: yes
  • Rails: no
  • Sidekiq: yes

JSON 구문 분석 오류

  • 설명: JSON이 잘못 형성되었을 때 (관찰: JSON 형식이 유효하지 않습니다. 다시 시도해 주세요)
  • 클래스: Gitlab::Llm::Chain::Tools::Identifier
  • Ai_event_name: error
  • 레벨: error
  • 인수:
    • none
  • 시스템의 일부: duo_chat
  • 확장된 로깅?: no
  • Rails: no
  • Sidekiq: yes

이미 식별된 리소스

  • 설명: 이미 식별된 리소스 (당신은 이미 #{resource_name} #{resource.to_global_id}를 식별했습니다. 주의 깊게 읽으세요.)
  • 클래스: Gitlab::Llm::Chain::Tools::Identifier
  • Ai_event_name: incorrect_response_received
  • 레벨: info
  • 인수:
    • error_message: content
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

지원되는 이슈 유형의 능력 허용

  • 설명: 이슈/에픽에 대한 능력 (policy.can?) 로깅
  • 클래스: Gitlab::Llm::Chain::Tools::SummarizeComments::Executor
  • Ai_event_name: permission
  • 레벨: info
  • 인수:
    • allowed: ability
  • 시스템의 일부: feature
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

지원되는 이슈 유형의 능력 허용

  • 설명: 이슈/에픽에 대한 능력 (policy.can?) 로깅
  • 클래스: Gitlab::Llm::Chain::Tools::SummarizeComments::ExecutorOld
  • Ai_event_name: permission
  • 레벨: info
  • 인수:
    • allowed: ability
  • 시스템의 일부: feature
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

summarize_comments에 대한 답변 내용

  • 설명: summarize comments 기능에 대한 답변
  • 클래스: Gitlab::Llm::Chain::Tools::SummarizeComments::ExecutorOld
  • Ai_event_name: response_received
  • 레벨: info
  • 인수:
    • response_from_llm: content
  • 시스템의 일부: feature
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

채팅 요청에서의 프롬프트 내용

  • 설명: 채팅 관련 요청
  • 클래스: Gitlab::Llm::Chain::Concerns::AiDependent
  • Ai_event_name: prompt_content
  • 레벨: info
  • 인수:
    • prompt: prompt_text
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

“요청이 너무 많습니다. #{delay}초 후에 재시도합니다.”

  • 설명: 지수 백오프 루프에 진입했을 때
  • 클래스: Gitlab::Llm::Chain::Concerns::ExponentialBackoff
  • Ai_event_name: retrying_request
  • 레벨: info
  • 인수:
    • 없음
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

리소스가 없습니다

  • 설명: 리소스가 없음/권한이 없음
  • 클래스: Gitlab::Llm::Utils::Authorizer
  • Ai_event_name: permission_denied
  • 레벨: info
  • 인수:
    • error_code: “M3003”
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

Duo Chat에 대한 액세스가 없음

  • 설명: Duo Chat에 대한 액세스가 없습니다
  • 클래스: Gitlab::Llm::Utils::Authorizer
  • Ai_event_name: permission_denied
  • 레벨: info
  • 인수:
    • error_code: “M3004”
  • 시스템의 일부: abstraction_layer
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

AI 비활성화

  • 설명: 컨테이너에 AI가 활성화되지 않음

  • 클래스: Gitlab::Llm::Utils::Authorizer

  • Ai_event_name: permission_denied

  • 수준: info

  • 인수:

    • error_code: “M3002”
  • 시스템의 일부: abstraction_layer

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

Vertex에 요청 수행

  • 설명: 요청 수행

  • 클래스: Gitlab::Llm::VertexAi::Client

  • Ai_event_name: performing_request

  • 수준: info

  • 인수:

    • unit_primitive: unit_primitive

    • options: config

  • 시스템의 일부: abstraction_layer

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

응답 콘텐츠

  • 설명: aigw - vertex로부터의 응답 콘텐츠

  • 클래스: Gitlab::Llm::VertexAi::Client

  • Ai_event_name: response_received

  • 수준: info

  • 인수:

    • unit_primitive: unit_primitive

    • response_from_llm: response.to_json

  • 시스템의 일부: abstraction_layer

  • 확장 로깅?: yes

  • Rails: no

  • Sidekiq: yes

Vertex로부터의 응답 수신

  • 설명: aigw - vertex로부터의 응답

  • 클래스: Gitlab::Llm::VertexAi::Client

  • Ai_event_name: response_received

  • 수준: info

  • 인수:

    • unit_primitive: unit_primitive
  • 시스템의 일부: abstraction_layer

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

Vertex로부터의 빈 응답

  • 설명: aigw - vertex로부터의 빈 응답

  • 클래스: Gitlab::Llm::VertexAi::Client

  • Ai_event_name: empty_response_received

  • 수준: error

  • 인수:

    • unit_primitive: unit_primitive
  • 시스템의 일부: abstraction_layer

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

사용자에게 최종 답변으로 알려지지 않은 이벤트 노출

  • 설명: 알려지지 않은 이벤트

  • 클래스: Gitlab::Llm::Chain::Agents::SingleActionExecutor

  • Ai_event_name: unknown_event

  • 수준: warn

  • 인수:

    • none
  • 시스템의 일부: duo_chat

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

GitLab Rails에서 도구를 찾는데 실패함

  • 설명: 도구를 찾지 못함

  • 클래스: Gitlab::Llm::Chain::Agents::SingleActionExecutor

  • Ai_event_name: tool_not_find

  • 수준: error

  • 인수:

    • tool_name: tool_name
  • 시스템의 일부: duo_chat

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

v2/chat/agent로부터 이벤트 수신

  • 설명: 이벤트 수신

  • 클래스: Gitlab::Duo::Chat::StepExecutor

  • Ai_event_name: event_received

  • 수준: info

  • 인수:

    • event: event
  • 시스템의 일부: duo_chat

  • 확장 로깅?: yes

  • Rails: no

  • Sidekiq: yes

관찰 업데이트 실패

  • 설명: 관찰 업데이트 실패

  • 클래스: Gitlab::Duo::Chat::StepExecutor

  • Ai_event_name: agent_steps_empty

  • 수준: error

  • 인수:

    • none
  • 시스템의 일부: duo_chat

  • 확장 로깅?: no

  • Rails: no

  • Sidekiq: yes

v2/chat/agent에 대한 요청

  • 설명: 요청
  • 클래스: Gitlab::Duo::Chat::StepExecutor
  • Ai_event_name: performing_request
  • 레벨: 정보
  • 인수:
    • params: params
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 예
  • Rails: 아니오
  • Sidekiq: 예

v2/chat/agent에서 스트리밍 완료

  • 설명: 스트리밍 완료
  • 클래스: Gitlab::Duo::Chat::StepExecutor
  • Ai_event_name: streaming_finished
  • 레벨: 정보
  • 인수:
    • 없음
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

Duo Chat Agent에서 오류 수신

  • 설명: 스트리밍 시 반환된 오류
  • 클래스: Gitlab::Duo::Chat::StepExecutor
  • Ai_event_name: error_returned
  • 레벨: 오류
  • 인수:
    • 상태: response.code
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

Duo Chat Agent에서 청크를 파싱하지 못함

  • 설명: 청크 파싱 실패
  • 클래스: Gitlab::Duo::Chat::AgentEventParser
  • Ai_event_name: parsing_error
  • 레벨: 경고
  • 인수:
    • event_json_size: event_json.length
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예

GitLab-Rails에서 이벤트 클래스를 찾지 못함

  • 설명: 이벤트 클래스 없음
  • 클래스: Gitlab::Duo::Chat::AgentEventParser
  • Ai_event_name: parsing_error
  • 레벨: 오류
  • 인수:
    • event_type: event[‘type’]
  • 시스템의 일부: duo_chat
  • 확장 로깅?: 아니오
  • Rails: 아니오
  • Sidekiq: 예