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

[GenAI Connectors] Add support for telemetry metadata #208180

Merged
merged 19 commits into from
Feb 6, 2025

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Jan 24, 2025

Summary

This extends initial connector telemetry from PR ref #186936.

The PR adds the following optional fields when instantiating a new actionClient as part of its subActionParams:

{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on" 
  }
}

The support is added to all AI connector models for both stream/non-stream/raw.

The PR also adds token count usage for bedrock InvokeAIRaw, as that was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the NL to ESQL functions, so that users can pass in similar metadata for LLM conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants to implement it. It could be a team name, a plugin name etc, all depending on how the team wants to group and filter on the telemetry event.

AggregateBy is intended to be used to group multiple LLM calls for aggregations and stats, for example a conversationId that has multiple LLM calls.

Both fields are optional, so when you do not want to aggregate the option can simply be ignored.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@P1llus P1llus marked this pull request as ready for review February 3, 2025 10:47
@P1llus P1llus requested review from a team as code owners February 3, 2025 10:47
@pgayvallet pgayvallet requested a review from a team as a code owner February 3, 2025 13:31
@P1llus P1llus added v9.0.0 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. backport:version Backport to applied version labels v8.18.0 labels Feb 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@P1llus P1llus added the release_note:skip Skip the PR/issue when compiling release notes label Feb 3, 2025
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

Security changes LGTM

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this improvement and for ensuring that all of our GenAI methods are captured in the token count

@pmuellr
Copy link
Member

pmuellr commented Feb 4, 2025

This PR is adding a telemetryMetadata param to the gen-ai connectors, and since those connectors can now be queued to run as actions (I think this is the PR that added that: #203729), these connectors now have to deal with "intermediate releases". For more info, see 2024-01 Requiring intermediate releases to change rule or connector schemas in serverless.

I think what that means for this PR is that the first (intermediate) release should include the optional parameter schema definition, but never actually set the field such that it would be persisted in production. That way if we need to roll back, the old versions of the schema will still validate the objects. Once that has been shipped in serverless, the next release can make use of the field.

@kibanamachine
Copy link
Contributor

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

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 6, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on"
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
(cherry picked from commit 3394b69)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 6, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on"
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
(cherry picked from commit 3394b69)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 6, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on"
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
(cherry picked from commit 3394b69)
@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 Feb 6, 2025
#210016)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[GenAI Connectors] Add support for telemetry metadata
(#208180)](#208180)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-06T14:24:35Z","message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[GenAI
Connectors] Add support for telemetry
metadata","number":208180,"url":"https://github.com/elastic/kibana/pull/208180","mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},"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/208180","number":208180,"mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
drewdaemon pushed a commit to drewdaemon/kibana that referenced this pull request Feb 6, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on" 
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 7, 2025
…#210018)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[GenAI Connectors] Add support for telemetry metadata
(#208180)](#208180)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-06T14:24:35Z","message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[GenAI
Connectors] Add support for telemetry
metadata","number":208180,"url":"https://github.com/elastic/kibana/pull/208180","mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},"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/208180","number":208180,"mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
@P1llus P1llus added backport:version Backport to applied version labels and removed backport:version Backport to applied version labels labels Feb 7, 2025
@kibanamachine
Copy link
Contributor

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

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 7, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on"
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
(cherry picked from commit 3394b69)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Cherrypick failed because the selected commit (3394b69) is empty. It looks like the commit was already backported in #210016
8.x
9.0 Cherrypick failed because the selected commit (3394b69) is empty. It looks like the commit was already backported in #210018

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 208180

Questions ?

Please refer to the Backport tool documentation

mariairiartef pushed a commit to mariairiartef/kibana that referenced this pull request Feb 7, 2025
## Summary

This extends initial connector telemetry from PR ref
elastic#186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on" 
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 7, 2025
…#210157)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[GenAI Connectors] Add support for telemetry metadata
(#208180)](#208180)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-06T14:24:35Z","message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[GenAI
Connectors] Add support for telemetry
metadata","number":208180,"url":"https://github.com/elastic/kibana/pull/208180","mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210018","number":210018,"state":"MERGED","mergeCommit":{"sha":"a4075782f4df67ec25dddec1046de50161dfc89b","message":"[9.0]
[GenAI Connectors] Add support for telemetry metadata (#208180)
(#210018)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [[GenAI Connectors] Add support for telemetry
metadata\n(#208180)](https://github.com/elastic/kibana/pull/208180)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Marius\nIversen\",\"email\":\"marius.iversen@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-02-06T14:24:35Z\",\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\",\"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:\nSecuritySolution\",\"backport:version\",\"v8.18.0\",\"v9.1.0\",\"v8.19.0\"],\"title\":\"[GenAI\nConnectors]
Add support for
telemetry\nmetadata\",\"number\":208180,\"url\":\"https://github.com/elastic/kibana/pull/208180\",\"mergeCommit\":{\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\"}},\"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/208180\",\"number\":208180,\"mergeCommit\":{\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\"}},{\"branch\":\"8.x\",\"label\":\"v8.19.0\",\"branchLabelMappingKey\":\"^v8.19.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Marius Iversen
<marius.iversen@elastic.co>"}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210016","number":210016,"state":"MERGED","mergeCommit":{"sha":"bf9401474bfe63139e25bb4c3546509f926954c7","message":"[8.18]
[GenAI Connectors] Add support for telemetry metadata (#208180)
(#210016)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.18`:\n- [[GenAI Connectors] Add support for telemetry
metadata\n(#208180)](https://github.com/elastic/kibana/pull/208180)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Marius\nIversen\",\"email\":\"marius.iversen@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-02-06T14:24:35Z\",\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\",\"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:\nSecuritySolution\",\"backport:version\",\"v8.18.0\",\"v9.1.0\",\"v8.19.0\"],\"title\":\"[GenAI\nConnectors]
Add support for
telemetry\nmetadata\",\"number\":208180,\"url\":\"https://github.com/elastic/kibana/pull/208180\",\"mergeCommit\":{\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\"}},\"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/208180\",\"number\":208180,\"mergeCommit\":{\"message\":\"[GenAI\nConnectors]
Add support for telemetry metadata (#208180)\\n\\n##\nSummary\\n\\nThis
extends initial connector telemetry from
PR\nref\\nhttps://github.com//pull/186936.\\n\\nThe PR
adds the\nfollowing optional fields when instantiating a
new\\nactionClient as part\nof its `subActionParams`:\\n\\n```ts\\n{\\n
telemetryMetadata : {\\n\npluginId: \\\"your plugin name or unique
identifier\\\",\\n aggregateBy: \\\"ID\nto aggregate on\\\" \\n
}\\n}\\n```\\n\\nThe support is added to all AI\nconnector models for
both\\nstream/non-stream/raw.\\n\\nThe PR also adds\ntoken count usage
for bedrock `InvokeAIRaw`, as that\\nwas currently not\nadded
correctly.\\n\\nPierre also helped with adding a new metadata\noptional
field for the `NL\\nto ESQL functions`, so that users can pass\nin
similar metadata for LLM\\nconversations using
the\nInfereceClient.\\n\\nPluginId is a field used to filter telemetry
in the\nway the team wants\\nto implement it. It could be a team name, a
plugin\nname etc, all\\ndepending on how the team wants to group and
filter on\nthe telemetry\\nevent.\\n\\nAggregateBy is intended to be
used to group\nmultiple LLM calls for\\naggregations and stats, for
example a\nconversationId that has multiple\\nLLM calls.\\n\\nBoth
fields are\noptional, so when you do not want to aggregate the\\noption
can simply be\nignored.\\n\\n### Checklist\\n\\nCheck the PR satisfies
following\nconditions. \\n\\nReviewers should verify this PR satisfies
this list as\nwell.\\n\\n- [x] Any text added follows
[EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence
case text and
includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[x]
[Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most common scenarios\\n- [x] The PR\ndescription
includes the appropriate Release Notes section,\\nand the\ncorrect
`release_note:*` label is applied
per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n---------\\n\\nCo-authored-by:\npgayvallet\n<pierre.gayvallet@elastic.co>\",\"sha\":\"3394b691b1582d504195182013f833ba727c5e7e\"}},{\"branch\":\"8.x\",\"label\":\"v8.19.0\",\"branchLabelMappingKey\":\"^v8.19.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Marius Iversen
<marius.iversen@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208180","number":208180,"mergeCommit":{"message":"[GenAI
Connectors] Add support for telemetry metadata (#208180)\n\n##
Summary\n\nThis extends initial connector telemetry from PR
ref\nhttps://github.com//pull/186936.\n\nThe PR adds the
following optional fields when instantiating a new\nactionClient as part
of its `subActionParams`:\n\n```ts\n{\n telemetryMetadata : {\n
pluginId: \"your plugin name or unique identifier\",\n aggregateBy: \"ID
to aggregate on\" \n }\n}\n```\n\nThe support is added to all AI
connector models for both\nstream/non-stream/raw.\n\nThe PR also adds
token count usage for bedrock `InvokeAIRaw`, as that\nwas currently not
added correctly.\n\nPierre also helped with adding a new metadata
optional field for the `NL\nto ESQL functions`, so that users can pass
in similar metadata for LLM\nconversations using the
InfereceClient.\n\nPluginId is a field used to filter telemetry in the
way the team wants\nto implement it. It could be a team name, a plugin
name etc, all\ndepending on how the team wants to group and filter on
the telemetry\nevent.\n\nAggregateBy is intended to be used to group
multiple LLM calls for\naggregations and stats, for example a
conversationId that has multiple\nLLM calls.\n\nBoth fields are
optional, so when you do not want to aggregate the\noption can simply be
ignored.\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\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)\n\n---------\n\nCo-authored-by:
pgayvallet
<pierre.gayvallet@elastic.co>","sha":"3394b691b1582d504195182013f833ba727c5e7e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
P1llus added a commit that referenced this pull request Feb 19, 2025
…11733)

As part of #208180 the
telemetryMetadata optional field was added to the schema for the AI
connectors, however it seems that one was missing, this PR simply adds
it in.

Similarly to the above PR, the feature cannot be used in the same week
as when it was added, to allow a grace period for serverless. The PR
simply adds the schema update itself.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 19, 2025
…astic#211733)

As part of elastic#208180 the
telemetryMetadata optional field was added to the schema for the AI
connectors, however it seems that one was missing, this PR simply adds
it in.

Similarly to the above PR, the feature cannot be used in the same week
as when it was added, to allow a grace period for serverless. The PR
simply adds the schema update itself.

(cherry picked from commit b85919e)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 19, 2025
…astic#211733)

As part of elastic#208180 the
telemetryMetadata optional field was added to the schema for the AI
connectors, however it seems that one was missing, this PR simply adds
it in.

Similarly to the above PR, the feature cannot be used in the same week
as when it was added, to allow a grace period for serverless. The PR
simply adds the schema update itself.

(cherry picked from commit b85919e)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 19, 2025
…astic#211733)

As part of elastic#208180 the
telemetryMetadata optional field was added to the schema for the AI
connectors, however it seems that one was missing, this PR simply adds
it in.

Similarly to the above PR, the feature cannot be used in the same week
as when it was added, to allow a grace period for serverless. The PR
simply adds the schema update itself.

(cherry picked from commit b85919e)
kibanamachine added a commit that referenced this pull request Feb 19, 2025
…on (#211733) (#211768)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Genai Connectors] Add missing telemetryMetadata field definition
(#211733)](#211733)

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

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T13:42:07Z","message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Genai
Connectors] Add missing telemetryMetadata field
definition","number":211733,"url":"https://github.com/elastic/kibana/pull/211733","mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},"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/211733","number":211733,"mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 19, 2025
…ion (#211733) (#211766)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Genai Connectors] Add missing telemetryMetadata field definition
(#211733)](#211733)

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

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T13:42:07Z","message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Genai
Connectors] Add missing telemetryMetadata field
definition","number":211733,"url":"https://github.com/elastic/kibana/pull/211733","mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},"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/211733","number":211733,"mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 19, 2025
…on (#211733) (#211767)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Genai Connectors] Add missing telemetryMetadata field definition
(#211733)](#211733)

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

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

<!--BACKPORT [{"author":{"name":"Marius
Iversen","email":"marius.iversen@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T13:42:07Z","message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689","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:
SecuritySolution","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Genai
Connectors] Add missing telemetryMetadata field
definition","number":211733,"url":"https://github.com/elastic/kibana/pull/211733","mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},"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/211733","number":211733,"mergeCommit":{"message":"[Genai
Connectors] Add missing telemetryMetadata field definition
(#211733)\n\nAs part of #208180
the\ntelemetryMetadata optional field was added to the schema for the
AI\nconnectors, however it seems that one was missing, this PR simply
adds\nit in.\n\nSimilarly to the above PR, the feature cannot be used in
the same week\nas when it was added, to allow a grace period for
serverless. The PR\nsimply adds the schema update
itself.","sha":"b85919e6c299e67121e47b542762dfe124b99689"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
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: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. 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.

8 participants