Skip to content

Instrument Collections Methods#85

Merged
aaditjuneja merged 5 commits intomainfrom
aadit/collections-instrument
Jan 21, 2026
Merged

Instrument Collections Methods#85
aaditjuneja merged 5 commits intomainfrom
aadit/collections-instrument

Conversation

@aaditjuneja
Copy link
Contributor

Instrument Collections Methods

Checklist

  • I have read both the CONTRIBUTING.md and Contributor License Agreement documents.
  • I have created an issue or feature request and received approval from xAI maintainers. (minor changes like fixing typos can skip this step)
  • I have tested my changes locally and they pass all CI checks.
  • I have added necessary documentation or updated existing documentation.

Description

We instrument the following methods in both the async and sync Collections Clients.

- create()
- update()
- delete()
- upload_document()
- add_existing_document()
- remove_document()
- update_document()

The naming scheme we elected for was to have the span name be collections.{method}, with each span having an attribute called operation.name set to {method}. This could be repetitive but let me know what you think.

Related Issue

N/A

Type of Change

Adding collections instrumentation

Additional Notes

N/A

@aaditjuneja aaditjuneja requested a review from a team as a code owner January 21, 2026 02:00
@aaditjuneja aaditjuneja force-pushed the aadit/collections-instrument branch from aadabb4 to 1e7d2c1 Compare January 21, 2026 18:36
@aaditjuneja aaditjuneja merged commit eadd9f8 into main Jan 21, 2026
7 checks passed
@aaditjuneja aaditjuneja deleted the aadit/collections-instrument branch January 21, 2026 18:40
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