Skip to content

[Obs AI Assistant] Forward telemetryMetadata.pluginId to the EIS use case header#214285

Merged
viduni94 merged 4 commits intoelastic:mainfrom
viduni94:forward-plugin-id-to-eis-use-case-header
Mar 13, 2025
Merged

[Obs AI Assistant] Forward telemetryMetadata.pluginId to the EIS use case header#214285
viduni94 merged 4 commits intoelastic:mainfrom
viduni94:forward-plugin-id-to-eis-use-case-header

Conversation

@viduni94
Copy link
Contributor

@viduni94 viduni94 commented Mar 12, 2025

Summary

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

This PR forwards the Obs AI Assistant use case header for EIS through the existing telemetryData property.

Relates to https://github.com/elastic/search-team/issues/9424
The header is implemented in this PR - #214269

Checklist

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@viduni94 viduni94 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Obs AI Assistant Observability AI Assistant backport:version Backport to applied version labels v8.18.0 v9.1.0 v8.19.0 labels Mar 12, 2025
@viduni94 viduni94 self-assigned this Mar 12, 2025
@viduni94 viduni94 requested a review from a team as a code owner March 12, 2025 20:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

tools,
functionCalling: (simulateFunctionCalling ? 'simulated' : 'auto') as FunctionCallingMode,
metadata: {
connectorTelemetry: {
Copy link
Contributor

Choose a reason for hiding this comment

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

the field is called telemetryMetadata, and should exist at the subActionParams level of the execute request. For example:

subActionParams: {
    telemetryMetadata: {
        pluginId: 'observability_ai_assistant'
    }
}

I've not used the inferenceClient.chatComplete, but you'll want to make sure this data is at the subActionParams level of wherever the connector call is being made

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @stephmilovic

The Inference ChatComplete API has metadata:

And that has connectorTelemetry -

export interface ChatCompleteMetadata {
connectorTelemetry?: ConnectorTelemetryMetadata;
}

And in the inference adapter, it gets passed as subActionParams to telemetryMetadata:

subActionParams: {
body: request,
signal: abortSignal,
...(metadata?.connectorTelemetry
? { telemetryMetadata: metadata.connectorTelemetry }
: {}),

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, thanks!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @viduni94

@viduni94 viduni94 merged commit d66e0b2 into elastic:main Mar 13, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/13843052148

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…e case header (elastic#214285)

## Summary

Closes elastic/obs-ai-team#217

This PR forwards the Obs AI Assistant use case header for EIS through
the existing `telemetryData` property.

Relates to elastic/search-team#9424
The header is implemented in this PR -
elastic#214269

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit d66e0b2)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…e case header (elastic#214285)

## Summary

Closes elastic/obs-ai-team#217

This PR forwards the Obs AI Assistant use case header for EIS through
the existing `telemetryData` property.

Relates to elastic/search-team#9424
The header is implemented in this PR -
elastic#214269

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit d66e0b2)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…e case header (elastic#214285)

## Summary

Closes elastic/obs-ai-team#217

This PR forwards the Obs AI Assistant use case header for EIS through
the existing `telemetryData` property.

Relates to elastic/search-team#9424
The header is implemented in this PR -
elastic#214269

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit d66e0b2)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.x
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 13, 2025
…EIS use case header (#214285) (#214481)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Obs AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS
use case header
(#214285)](#214285)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2025-03-13T19:29:37Z","message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header","number":214285,"url":"https://github.com/elastic/kibana/pull/214285","mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214285","number":214285,"mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
… EIS use case header (#214285) (#214479)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Obs AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS
use case header
(#214285)](#214285)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2025-03-13T19:29:37Z","message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header","number":214285,"url":"https://github.com/elastic/kibana/pull/214285","mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214285","number":214285,"mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
…EIS use case header (#214285) (#214480)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS
use case header
(#214285)](#214285)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2025-03-13T19:29:37Z","message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header","number":214285,"url":"https://github.com/elastic/kibana/pull/214285","mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214285","number":214285,"mergeCommit":{"message":"[Obs
AI Assistant] Forward `telemetryMetadata.pluginId` to the EIS use case
header (#214285)\n\n## Summary\n\nCloses
https://github.com/elastic/obs-ai-assistant-team/issues/217\n\nThis PR
forwards the Obs AI Assistant use case header for EIS through\nthe
existing `telemetryData` property.\n\nRelates to
https://github.com/elastic/search-team/issues/9424\nThe header is
implemented in this PR
-\nhttps://github.com//pull/214269\n\n### Checklist\n\n-
[x] The PR description includes the appropriate Release Notes
section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d66e0b25258b0568857bf6a0882e4d40e1f7e771"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
…e case header (elastic#214285)

## Summary

Closes elastic/obs-ai-team#217

This PR forwards the Obs AI Assistant use case header for EIS through
the existing `telemetryData` property.

Relates to elastic/search-team#9424
The header is implemented in this PR -
elastic#214269

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants