Skip to content
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

[Obs AI Assistant] Add APM instrumentation for chat/complete #175799

Merged

Conversation

dgieselaar
Copy link
Member

@dgieselaar dgieselaar commented Jan 29, 2024

Adds APM instrumentation for function calls and interactions with the LLM.

Closes https://github.com/elastic/obs-ai-assistant-team/issues/120

@dgieselaar dgieselaar requested a review from a team as a code owner January 29, 2024 14:01
@dgieselaar dgieselaar added release_note:skip Skip the PR/issue when compiling release notes v8.13.0 labels Jan 29, 2024
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@miltonhultgren miltonhultgren left a comment

Choose a reason for hiding this comment

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

I don't see the instrumentation being added to /complete on the client side?

@dgieselaar
Copy link
Member Author

@miltonhultgren re:

I don't see the instrumentation being added to /complete on the client side?

What would we need it for? Most stuff happens on the server (maybe I'm missing something)

@miltonhultgren
Copy link
Contributor

miltonhultgren commented Feb 1, 2024

What would we need it for? Most stuff happens on the server (maybe I'm missing something)

It's more likely I'm missing something but we add the name param to both routes (chat and complete) but as I can tell only chat passes that param in the request? I'm probably just reading the code wrong.

Yeah I get it now, we pass it to chat from the (frontend) client, but not to complete because in complete we deduce the name from the conversation name or function call etc. which we then pass to chat in the server service, so that's also why that is primarily the thing being instrumented!

@dgieselaar
Copy link
Member Author

@elasticmachine merge upstream

@dgieselaar dgieselaar enabled auto-merge (squash) February 3, 2024 12:22
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAIAssistant 151.0KB 151.0KB +9.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dgieselaar dgieselaar merged commit 441ed1b into elastic:main Feb 5, 2024
18 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Feb 5, 2024
@dgieselaar dgieselaar deleted the obs-ai-assistant-apm-instrumentation branch February 5, 2024 09:43
fkanout pushed a commit to fkanout/kibana that referenced this pull request Feb 7, 2024
…#175799)

Adds APM instrumentation for function calls and interactions with the
LLM.

Closes elastic/obs-ai-assistant-team#120
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…#175799)

Adds APM instrumentation for function calls and interactions with the
LLM.

Closes elastic/obs-ai-assistant-team#120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants