Skip to content

[Cases] Incremental id telemetry and config improvements#226935

Merged
janmonschke merged 3 commits intoelastic:mainfrom
janmonschke:cases/incremental-id-telemetry-config
Jul 9, 2025
Merged

[Cases] Incremental id telemetry and config improvements#226935
janmonschke merged 3 commits intoelastic:mainfrom
janmonschke:cases/incremental-id-telemetry-config

Conversation

@janmonschke
Copy link
Contributor

@janmonschke janmonschke commented Jul 8, 2025

Summary

Adds success/error counting to the incremental ID service and fixes the missing usage of delayMinutes.

@janmonschke janmonschke added release_note:skip Skip the PR/issue when compiling release notes Team:Cases Security Solution Cases team labels Jul 8, 2025
@janmonschke janmonschke self-assigned this Jul 8, 2025
@janmonschke janmonschke added backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Jul 8, 2025
endTime - startTime
}ms [ started: ${initializedTime}, ended: ${new Date().toISOString()} ]`
);
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wrapped this in a try/catch, therefore the whitespace changed.

Comment on lines +90 to +98
this.successErrorUsageCounter?.incrementCounter({
counterName: 'incrementIdTaskSuccess',
incrementBy: 1,
});
} catch (_) {
this.successErrorUsageCounter?.incrementCounter({
counterName: 'incrementIdTaskError',
incrementBy: 1,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual change

taskType: CASES_INCREMENTAL_ID_SYNC_TASK_TYPE,
// start delayed to give the system some time to start up properly
runAt: new Date(new Date().getTime() + this.config.taskIntervalMinutes * 60 * 1000),
runAt: new Date(new Date().getTime() + this.config.taskStartDelayMinutes * 60 * 1000),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was forgotten in a previous PR

@janmonschke janmonschke changed the title [IN PROGRESS][Cases] Incremental id telemetry and config improvements [Cases] Incremental id telemetry and config improvements Jul 9, 2025
@janmonschke janmonschke marked this pull request as ready for review July 9, 2025 07:19
@janmonschke janmonschke requested review from a team as code owners July 9, 2025 07:19
Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this telemetry. Do we also want to add custom telemetry to get the [cases with id applied] / [total number of cases]? That would have to be set up as a separate collector I realize

@janmonschke
Copy link
Contributor Author

Thanks for adding this telemetry. Do we also want to add custom telemetry to get the [cases with id applied] / [total number of cases]? That would have to be set up as a separate collector I realize

@michaelolo24 I talked to kibana-core about this and they don't support histogram values at the moment. This is nothing we can support with simple counters at the moment.

@janmonschke janmonschke merged commit 2a0921f into elastic:main Jul 9, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 9, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.

(cherry picked from commit 2a0921f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 9, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.

(cherry picked from commit 2a0921f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

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 Jul 9, 2025
) (#227238)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Cases] Incremental id telemetry and config improvements
(#226935)](#226935)

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

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

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2025-07-09T12:43:29Z","message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","Team:Cases","v9.2.0"],"title":"[Cases]
Incremental id telemetry and config
improvements","number":226935,"url":"https://github.com/elastic/kibana/pull/226935","mergeCommit":{"message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226935","number":226935,"mergeCommit":{"message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d"}}]}]
BACKPORT-->

Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 9, 2025
…) (#227239)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Cases] Incremental id telemetry and config improvements
(#226935)](#226935)

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

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

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2025-07-09T12:43:29Z","message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","Team:Cases","v9.2.0"],"title":"[Cases]
Incremental id telemetry and config
improvements","number":226935,"url":"https://github.com/elastic/kibana/pull/226935","mergeCommit":{"message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226935","number":226935,"mergeCommit":{"message":"[Cases]
Incremental id telemetry and config improvements (#226935)\n\n##
Summary\n\nAdds success/error counting to the incremental ID service and
fixes the\nmissing usage of
`delayMinutes`.","sha":"2a0921fa05400822c47bbf2c4f21039cb06e0a2d"}}]}]
BACKPORT-->

Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
janmonschke added a commit to janmonschke/kibana that referenced this pull request Jul 15, 2025
janmonschke added a commit that referenced this pull request Jul 16, 2025
## Summary

Reverts #222874 and
#226935 .
The mappings and the introduction of the saved object type for the
increment counter object cannot be reverted.

In a future PR we will bring this feature back under a different name
and reuse the increment counter object that has been introduced already.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 16, 2025
…ic#228002)

## Summary

Reverts elastic#222874 and
elastic#226935 .
The mappings and the introduction of the saved object type for the
increment counter object cannot be reverted.

In a future PR we will bring this feature back under a different name
and reuse the increment counter object that has been introduced already.

(cherry picked from commit d03ab6d)
janmonschke added a commit to janmonschke/kibana that referenced this pull request Jul 16, 2025
…ic#228002)

## Summary

Reverts elastic#222874 and
elastic#226935 .
The mappings and the introduction of the saved object type for the
increment counter object cannot be reverted.

In a future PR we will bring this feature back under a different name
and reuse the increment counter object that has been introduced already.

(cherry picked from commit d03ab6d)

# Conflicts:
#	src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts
#	src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts
#	src/platform/plugins/shared/telemetry/schema/oss_platform.json
#	x-pack/platform/plugins/shared/cases/public/components/all_cases/use_cases_columns.tsx
#	x-pack/platform/plugins/shared/cases/server/plugin.test.ts
#	x-pack/platform/plugins/shared/cases/server/plugin.ts
kibanamachine added a commit that referenced this pull request Jul 16, 2025
…228002) (#228151)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Cases] Reverts the introduction of the incremental_id service
(#228002)](#228002)

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

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

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2025-07-16T08:07:17Z","message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","Team:Cases","v9.2.0"],"title":"[Cases]
Reverts the introduction of the incremental_id
service","number":228002,"url":"https://github.com/elastic/kibana/pull/228002","mergeCommit":{"message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228002","number":228002,"mergeCommit":{"message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45"}}]}]
BACKPORT-->

Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
janmonschke added a commit that referenced this pull request Jul 16, 2025
…#228002) (#228156)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Cases] Reverts the introduction of the incremental_id service
(#228002)](#228002)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2025-07-16T08:07:17Z","message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","Team:Cases","v9.2.0"],"title":"[Cases]
Reverts the introduction of the incremental_id
service","number":228002,"url":"https://github.com/elastic/kibana/pull/228002","mergeCommit":{"message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228151","number":228151,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228002","number":228002,"mergeCommit":{"message":"[Cases]
Reverts the introduction of the incremental_id service (#228002)\n\n##
Summary\n\nReverts #222874
and\nhttps://github.com//pull/226935 .\nThe mappings and
the introduction of the saved object type for the\nincrement counter
object cannot be reverted.\n\nIn a future PR we will bring this feature
back under a different name\nand reuse the increment counter object that
has been introduced
already.","sha":"d03ab6dbb89bcfe70b513b7971bf010fce2c2b45"}}]}]
BACKPORT-->
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
…ic#228002)

## Summary

Reverts elastic#222874 and
elastic#226935 .
The mappings and the introduction of the saved object type for the
increment counter object cannot be reverted.

In a future PR we will bring this feature back under a different name
and reuse the increment counter object that has been introduced already.
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…ic#228002)

## Summary

Reverts elastic#222874 and
elastic#226935 .
The mappings and the introduction of the saved object type for the
increment counter object cannot be reverted.

In a future PR we will bring this feature back under a different name
and reuse the increment counter object that has been introduced already.
christineweng pushed a commit to christineweng/kibana that referenced this pull request Aug 1, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Aug 22, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Aug 22, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Sep 2, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Sep 2, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Sep 4, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Sep 11, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to michaelolo24/kibana that referenced this pull request Sep 11, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
michaelolo24 pushed a commit to christineweng/kibana that referenced this pull request Sep 11, 2025
)

## Summary

Adds success/error counting to the incremental ID service and fixes the
missing usage of `delayMinutes`.
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:Cases Security Solution Cases team v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants