Skip to content

Commit

Permalink
Fix search telemetry to only update SO periodically (#93130) (#94455)
Browse files Browse the repository at this point in the history
* Fix search telemetry to only update SO periodically

* Handle case when searches completed mid flight

* Fix error in resetting counters

* Update docs

* update docs

* Don't track restored searches

* Update docs

* Update docs

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Anton Dosov <[email protected]>
# Conflicts:
#	api_docs/cases.json
#	api_docs/data_search.json
#	api_docs/lists.json
#	api_docs/security_solution.json
  • Loading branch information
lukasolson authored Mar 11, 2021
1 parent d7ba901 commit 7831473
Show file tree
Hide file tree
Showing 10 changed files with 6,890 additions and 40 deletions.
63 changes: 63 additions & 0 deletions api_docs/cases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "cases",
"client": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
},
"server": {
"classes": [],
"functions": [],
"interfaces": [
{
"id": "def-server.CaseRequestContext",
"type": "Interface",
"label": "CaseRequestContext",
"description": [],
"tags": [],
"children": [
{
"tags": [],
"id": "def-server.CaseRequestContext.getCasesClient",
"type": "Function",
"label": "getCasesClient",
"description": [],
"source": {
"path": "x-pack/plugins/cases/server/types.ts",
"lineNumber": 14
},
"signature": [
"() => ",
{
"pluginId": "cases",
"scope": "server",
"docId": "kibCasesPluginApi",
"section": "def-server.CasesClient",
"text": "CasesClient"
}
]
}
],
"source": {
"path": "x-pack/plugins/cases/server/types.ts",
"lineNumber": 13
},
"initialIsOpen": false
}
],
"enums": [],
"misc": [],
"objects": []
},
"common": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
}
}
18 changes: 18 additions & 0 deletions api_docs/cases.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: kibCasesPluginApi
slug: /kibana-dev-docs/casesPluginApi
title: cases
image: https://source.unsplash.com/400x175/?github
summary: API docs for the cases plugin
date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---

import casesObj from './cases.json';

## Server

### Interfaces
<DocDefinitionList data={casesObj.server.interfaces}/>

90 changes: 84 additions & 6 deletions api_docs/data_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,15 @@
"section": "def-server.SearchUsage",
"text": "SearchUsage"
},
" | undefined) => { next(response: ",
" | undefined, { isRestore }: ",
{
"pluginId": "data",
"scope": "common",
"docId": "kibDataSearchPluginApi",
"section": "def-common.ISearchOptions",
"text": "ISearchOptions"
},
") => { next(response: ",
{
"pluginId": "data",
"scope": "common",
Expand All @@ -1580,8 +1588,7 @@
"description": [],
"source": {
"path": "src/plugins/data/server/search/collectors/usage.ts",
"lineNumber": 64,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/search/collectors/usage.ts#L64"
"lineNumber": 83
}
},
{
Expand All @@ -1601,8 +1608,79 @@
"description": [],
"source": {
"path": "src/plugins/data/server/search/collectors/usage.ts",
"lineNumber": 64,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/search/collectors/usage.ts#L64"
"lineNumber": 84
}
},
{
"type": "Object",
"label": "{ isRestore }",
"isRequired": true,
"signature": [
{
"pluginId": "data",
"scope": "common",
"docId": "kibDataSearchPluginApi",
"section": "def-common.ISearchOptions",
"text": "ISearchOptions"
}
],
"description": [],
"source": {
"path": "src/plugins/data/server/search/collectors/usage.ts",
"lineNumber": 85
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/plugins/data/server/search/collectors/usage.ts",
"lineNumber": 82
},
"initialIsOpen": false
},
{
"id": "def-server.usageProvider",
"type": "Function",
"label": "usageProvider",
"signature": [
"(core: ",
{
"pluginId": "core",
"scope": "server",
"docId": "kibCorePluginApi",
"section": "def-server.CoreSetup",
"text": "CoreSetup"
},
"<object, unknown>) => ",
{
"pluginId": "data",
"scope": "server",
"docId": "kibDataSearchPluginApi",
"section": "def-server.SearchUsage",
"text": "SearchUsage"
}
],
"description": [],
"children": [
{
"type": "Object",
"label": "core",
"isRequired": true,
"signature": [
{
"pluginId": "core",
"scope": "server",
"docId": "kibCorePluginApi",
"section": "def-server.CoreSetup",
"text": "CoreSetup"
},
"<object, unknown>"
],
"description": [],
"source": {
"path": "src/plugins/data/server/search/collectors/usage.ts",
"lineNumber": 22
}
}
],
Expand Down Expand Up @@ -20265,4 +20343,4 @@
}
]
}
}
}
Loading

0 comments on commit 7831473

Please sign in to comment.