feat(slo): Add support for custom index for APM indicator types#147281
feat(slo): Add support for custom index for APM indicator types#147281kdelemme merged 8 commits intoelastic:mainfrom
Conversation
|
Pinging you @CoenWarmer since you discovered this while testing with CCS :) |
|
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
maryam-saeidi
left a comment
There was a problem hiding this comment.
Tested locally and worked as expected, just added some minor comments.
| it('uses the provided index params as source index', async () => { | ||
| const anSLO = createSLO({ | ||
| indicator: createAPMTransactionErrorRateIndicator({ | ||
| index: 'my-custom-apm-index*', |
There was a problem hiding this comment.
nit: saving 'my-custom-apm-index*' in a const to use it in both places.
| import { TransformGenerator } from '.'; | ||
|
|
||
| const APM_SOURCE_INDEX = 'metrics-apm*'; | ||
| const DEFAULT_APM_INDEX = 'metrics-apm*'; |
There was a problem hiding this comment.
Any reason to define DEFAULT_APM_INDEX twice? (also in apm_transaction_error_rate.ts)
There was a problem hiding this comment.
No reason, I tend to prefer having the constants defined in the module instead of an external file, but not attached to that rule
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @kdelemme |
📝 Summary
Resolves #147280
This PR add an optional
indexparameter for both APM indicator types to allow custom integration to configure which source index to use.🧪 Manual testing
Create SLO with specified index
✅ Check the index is returned:
Fetch all SLO
✅ Check the
transform > jsonin stack management is using the specified index