Skip to content

Conversation

@karthikscale3
Copy link
Collaborator

Description

Add support for crewAI's serper tool

Checklist for adding new integration:

  • Defined APIS in constants folder.
  • Updated SERVICE_PROVIDERS in common.py
  • Created a folder under instrumentation with the name of the integration with atleast patch.py and instrumentation.py files.
  • Added instrumentation in all_instrumentations in langtrace.py and to the InstrumentationType in types.py files.
  • Added examples for the new integration in the examples folder.
  • Updated pyproject.toml to install new dependencies
  • Updated the README.md of langtrace-python-sdk to include the new integration in the supported integrations table.
  • Updated the README.md of Langtrace's repository to include the new integration in the supported integrations table.
  • Added new integration page to supported integrations in Langtrace Docs

@karthikscale3 karthikscale3 merged commit b894632 into development Jan 27, 2025
4 checks passed
@karthikscale3 karthikscale3 deleted the karthik/add-serper-support branch January 27, 2025 10:35
print("\n\n\nTracing CrewaiTools\n\n\n")
service_provider = SERVICE_PROVIDERS["CREWAI"]
extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
span_attributes = {
Copy link
Collaborator

@alizenhom alizenhom Jan 27, 2025

Choose a reason for hiding this comment

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

Suggested change
span_attributes = {
span_attributes = {
**get_langtrace_attributes(version, service_provider, vendor_type="framework)
**get_extra_attributes()
}

for future reference should use helper methods from llm.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops just saw this. will update. thanks

span.set_status(Status(StatusCode.OK))
return result

except Exception as err:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
except Exception as err:
except Exception as err:
handle_span_error(span,err)
raise

for future ref, should use helper method

karthikscale3 added a commit that referenced this pull request Jan 27, 2025
* remove logs

* remove requirements

* Bump version

* Squash

* minor

* switch to http exporter

* add botocore dependency

* fix

* fix dspy issue for handling sets

* Bump trace attributes to 7.1.1 (#464)

* bump trace attributes

* fix

* bump openai version

* Minor fix (#466)

* Add support for crewAI's serper tool (#470)

* serper support

* serper support

* serper support
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.

3 participants