Skip to content

feat(marqo): Add marqo instrumentation #1373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 27, 2024
Merged

Conversation

Benedikt-Wolf
Copy link
Contributor

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Supports the basic operations of adding/deleting documents and querying an index.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Member

@nirga nirga left a comment

Choose a reason for hiding this comment

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

Thanks so much for this @Benedikt-Wolf! Left a small comment

@Benedikt-Wolf
Copy link
Contributor Author

Hey @nirga, thanks for reviewing my PR! I can't seem to find the comment you mentioned - I'm starting to doubt myself here 😅. Could you confirm if the comment was actually added successfully, or am I just missing something obvious? Thanks!

Copy link
Member

@nirga nirga left a comment

Choose a reason for hiding this comment

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

Oops! Added the comment now

@dont_throw
def _set_delete_documents_attributes(span, kwargs):
_set_span_attribute(
span, "db.marqo.delete_documents.ids_count", count_or_none(kwargs.get("ids"))
Copy link
Member

Choose a reason for hiding this comment

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

Can you use the semantic conventions for these? If there are common ones you can use - it'd be best. Otherwise, just extract them to the semantic conventions package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With common ones, do you mean using f.e. CHROMADB_DELETE_IDS_COUNT for this example?

Copy link
Member

Choose a reason for hiding this comment

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

Exactly, but there are already some attributes there with similar meanings from other vector DBs

Copy link
Contributor Author

@Benedikt-Wolf Benedikt-Wolf Jun 25, 2024

Choose a reason for hiding this comment

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

I added the new semantic conventions I need to the corresponding file, but I could not use them in the wrapper since it does not import the files from my local changes. I'd do another PR after the opentelemetry-semantic-conventions-ai package is updated changing 'db.marqo.search.query' etc. to AISpanAttributes.MARQO_SEARCH_QUERY to fix that. Or is there another way to resolve this?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's a limitation of Poetry with nested local deps. I've released a version for the semconv so it should work for you now @Benedikt-Wolf

Benedikt-Wolf and others added 5 commits June 25, 2024 13:42
@nirga nirga merged commit a3a7d4e into traceloop:main Jun 27, 2024
8 checks passed
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.

None yet

2 participants