Skip to content

NCO-21: Logging updates#58

Merged
davidkelly merged 3 commits intomasterfrom
dk/21
Apr 15, 2026
Merged

NCO-21: Logging updates#58
davidkelly merged 3 commits intomasterfrom
dk/21

Conversation

@davidkelly
Copy link
Copy Markdown
Collaborator

@davidkelly davidkelly commented Apr 13, 2026

  • Implement high-performance [LoggerMessage] source generators
    for Cluster and CouchbaseHttpClientFactory lifecycles.
  • Update AnalyticsService logs to trace QueryContext to improve
    multi-tenant request debugging.
  • Refactor QueryHandle and QueryResultHandle to parse server
    telemetry dynamically into .ToString() outputs instead of
    holding raw JSON fields.
  • Restructure QueryMetrics via backwards-compatible
    QueryMetricsBase inheritance to organically support async
    schemas (omitting exactly the ResultCount property).

* Implement high-performance [LoggerMessage] source generators
  for Cluster and CouchbaseHttpClientFactory lifecycles.
* Update AnalyticsService logs to trace QueryContext to improve
  multi-tenant request debugging.
* Refactor QueryHandle and QueryResultHandle to parse server
  telemetry dynamically into .ToString() outputs instead of
  holding raw JSON fields.
* Restructure QueryMetrics via backwards-compatible
  QueryMetricsBase inheritance to organically support async
  schemas (omitting the ResultCount property).
@davidkelly davidkelly changed the title Dk/21 NCO-21: Logging updates Apr 13, 2026
@davidkelly davidkelly requested a review from emilienbev April 13, 2026 20:45
@davidkelly davidkelly marked this pull request as ready for review April 13, 2026 20:45
@davidkelly
Copy link
Copy Markdown
Collaborator Author

Note the first commit is the work, second one is just a sweep up of warnings

@davidkelly davidkelly requested a review from jeffrymorris April 14, 2026 17:12
Comment thread src/Couchbase.Analytics/Async/QueryResultHandle.cs Outdated
Comment thread src/Couchbase.Analytics/Internal/AnalyticsService.cs
* Refactor QueryHandle and QueryResultHandle constructors to accept
  a parsed JsonElement instead of a raw JSON string, removing the
  unnecessary GetRawText() → JsonDocument.Parse() round-trip.
* Add defensive guard for undefined/null JsonElement values.
* Introduce TestHandleFactory in the test project to centralise
  the JsonDocument.Parse boilerplate for test readability.
Copy link
Copy Markdown
Contributor

@jeffrymorris jeffrymorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for your changes...lmk

@davidkelly davidkelly merged commit a144fc6 into master Apr 15, 2026
3 checks passed
@davidkelly davidkelly deleted the dk/21 branch April 15, 2026 17: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.

2 participants