Skip to content

feat(ci_visibility): send error logs to telemetry endpoint#17698

Draft
gnufede wants to merge 1 commit intomainfrom
telemetry/error-logs
Draft

feat(ci_visibility): send error logs to telemetry endpoint#17698
gnufede wants to merge 1 commit intomainfrom
telemetry/error-logs

Conversation

@gnufede
Copy link
Copy Markdown
Member

@gnufede gnufede commented Apr 23, 2026

Summary

  • Adds record_error_log method to TelemetryAPI, delegating to the ddtrace telemetry writer's add_error_log
  • Instruments 16 API client error paths and git-missing detection to submit internal errors to the telemetry logs intake
  • Uses constant message strings (per check_constant_log_message.py guardrail) with exc_info for dynamic stack traces

Test plan

  • Unit test for record_error_log basic call
  • Unit test with exc_info tuple
  • Unit test for NoOp writer (no add_error_log attribute)
  • Verify error logs appear in Datadog Error Tracking via telemetry intake

Motivation

Per CI Visibility telemetry RFC: internal library errors should be uploaded to the telemetry logs endpoint for visibility in the Logs product and Error Tracking, matching .NET and Node.js tracer behavior.

🤖 Generated with Claude Code

…I failures

Record error logs via telemetry for API client failures (settings, known tests,
test management, known commits, git packfile, skippable tests) and git binary
errors. Uses constant string messages for Error Tracking deduplication with
exc_info providing dynamic stack trace details.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gnufede gnufede requested review from a team as code owners April 23, 2026 12:00
@gnufede gnufede requested a review from brettlangdon April 23, 2026 12:00
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Codeowners resolved as

ddtrace/testing/internal/api_client.py                                  @DataDog/ci-app-libraries
ddtrace/testing/internal/session_manager.py                             @DataDog/ci-app-libraries
ddtrace/testing/internal/telemetry.py                                   @DataDog/ci-app-libraries
scripts/check_constant_log_message.py                                   @DataDog/apm-core-python
tests/testing/internal/test_telemetry.py                                @DataDog/ci-app-libraries

@gnufede gnufede marked this pull request as draft April 23, 2026 12:02
@gnufede gnufede removed the request for review from brettlangdon April 23, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant