canopy icon indicating copy to clipboard operation
canopy copied to clipboard

Added `source_tag='canopy'` to `knowledge_base._get_global_client()`

Open cwaddingham opened this issue 8 months ago • 1 comments

Problem

It's not easy to quickly attribute index activity to Canopy, so we don't have a reliable way of comparing its use with other frameworks using Pinecone.

Solution

This adds a source_tag, 'canopy', which is inline with how our partners manage their attributions.

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [ ] Infrastructure change (CI configs, etc)
  • [ ] Non-code change (docs, etc)
  • [ ] None of the above: (explain here)

Test Plan

  1. Create a new Canopy index using the changed module.
  2. Upsert one or more documents to the index.
  3. Check the backend traces for the user_agent header "source_tag=canopy".

cwaddingham avatar Jun 17 '24 18:06 cwaddingham