feat(csharp/src/Drivers/Databricks): Add minimal Activity-based logging to RetryHttpHandler #3618
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Summary
Adds Activity-based logging to
RetryHttpHandler.csfor improved observability of HTTP retry behavior.Changes
Logging Strategy
What Gets Logged
Tags (When Retries Occur):
http.retry.attempt- Current attempt number (logged per retry)http.retry.total_attempts- Total number of retry attemptshttp.response.status_code- HTTP status codehttp.retry.outcome- Only for failures:cancelledortimeout_exceededException Context (On Failures):
error.context- Failure reason (http.retry.cancelledorhttp.retry.timeout_exceeded)attempts- Number of attempts madetotal_retry_seconds/timeout_seconds- Timing information (timeout cases only)Retryable Status Codes: 408, 502, 503, 504
Example Log Output
Success (No Retries):
// NO LOGGING - Most efficient pathSuccess After Retries:
{ "Tags": { "http.retry.attempt": 1, "http.response.status_code": 503, "http.retry.attempt": 2, "http.response.status_code": 503, "http.retry.total_attempts": 2, "http.response.status_code": 200 } }Timeout Exceeded:
{ "Tags": { "http.retry.total_attempts": 3, "http.response.status_code": 503, "http.retry.outcome": "timeout_exceeded" }, "Exception": { "error.context": "http.retry.timeout_exceeded", "attempts": 3, "total_retry_seconds": 7, "timeout_seconds": 30 } }Testing
Tested locally with log output.
Breaking Changes
None. Additive logging only.