Skip to content

Commit

Permalink
Merge branch 'master' into issue-xxx-http-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Feb 27, 2020
2 parents f7df6fd + 2b4a9fd commit f5c22f1
Show file tree
Hide file tree
Showing 2,005 changed files with 52,226 additions and 77,190 deletions.
8 changes: 4 additions & 4 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
BASE_DIR = 'src/github.com/elastic/kibana'
HOME = "${env.WORKSPACE}"
APM_ITS = 'apm-integration-testing'
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/cypress'
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/e2e'
PIPELINE_LOG_LEVEL = 'DEBUG'
}
options {
Expand Down Expand Up @@ -107,7 +107,7 @@ pipeline {
dir("${BASE_DIR}"){
sh '''
jobs -l
docker build --tag cypress ${CYPRESS_DIR}/ci
docker build --tag cypress --build-arg NODE_VERSION=$(cat .node-version) ${CYPRESS_DIR}/ci
docker run --rm -t --user "$(id -u):$(id -g)" \
-v `pwd`:/app --network="host" \
--name cypress cypress'''
Expand All @@ -116,8 +116,8 @@ pipeline {
post {
always {
dir("${BASE_DIR}"){
archiveArtifacts(allowEmptyArchive: false, artifacts: "${CYPRESS_DIR}/screenshots/**,${CYPRESS_DIR}/videos/**,${CYPRESS_DIR}/*e2e-tests.xml")
junit(allowEmptyResults: true, testResults: "${CYPRESS_DIR}/*e2e-tests.xml")
archiveArtifacts(allowEmptyArchive: false, artifacts: "${CYPRESS_DIR}/**/screenshots/**,${CYPRESS_DIR}/**/videos/**,${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
junit(allowEmptyResults: true, testResults: "${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
}
dir("${APM_ITS}"){
sh 'docker-compose logs > apm-its.log || true'
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/moc
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
/x-pack/legacy/plugins/infra/server/graphql/types.ts
/x-pack/legacy/plugins/apm/cypress/**/snapshots.js
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
**/graphql/types.ts
**/*.js.snap
Expand Down
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/core_plugins/vis_type_table/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: [
'src/legacy/core_plugins/vis_default_editor/public/components/controls/**/*.{ts,tsx}',
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/plugins/searchprofiler/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui

# Endpoint
Expand Down
3 changes: 3 additions & 0 deletions .github/paths-labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- "Feature:Drilldowns":
- "x-pack/plugins/drilldowns/**/*.*"
4 changes: 2 additions & 2 deletions .github/workflows/pr-project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Assign a PR to project based on label
steps:
- name: Assign to project
uses: elastic/github-actions/[email protected].2
uses: elastic/github-actions/[email protected].3
id: project_assigner
with:
issue-mappings: |
Expand All @@ -17,4 +17,4 @@ jobs:
{ "label": "Feature:Lens", "projectName": "Lens", "columnId": 6219362 },
{ "label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580 }
]
ghToken: ${{ secrets.GITHUB_TOKEN }}
ghToken: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
name: Assign issue or PR to project based on label
steps:
- name: Assign to project
uses: elastic/github-actions/[email protected].2
uses: elastic/github-actions/[email protected].3
id: project_assigner
with:
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}, {"label": "Feature:Lens", "projectName": "Lens", "columnId": 6219363}, {"label": "Team:Canvas", "projectName": "canvas", "columnId": 6187593}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}
ghToken: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}


260 changes: 260 additions & 0 deletions docs/apm/api.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
[role="xpack"]
[[apm-api]]
== API

Some APM app features are provided via a REST API:

* <<agent-config-api>>

TIP: Kibana provides additional <<api,REST APIs>>,
and general information on <<using-api,how to use APIs>>.

////
*******************************************************
////

[[agent-config-api]]
=== Agent Configuration API

The Agent configuration API allows you to fine-tune your APM agent configuration,
without needing to redeploy your application.

The following Agent configuration APIs are available:

* <<apm-update-config>> to create or update an Agent configuration
* <<apm-delete-config>> to delete an Agent configuration.
* <<apm-list-config>> to list all Agent configurations.
* <<apm-search-config>> to search for an Agent configuration.

////
*******************************************************
////

[[apm-update-config]]
==== Create or update configuration

[[apm-update-config-req]]
===== Request

`PUT /api/apm/settings/agent-configuration`

[[apm-update-config-req-body]]
===== Request body

`service`::
(required, object) Service identifying the configuration to create or update.

`name` :::
(required, string) Name of service

`environment` :::
(optional, string) Environment of service

`settings`::
(required) Key/value object with settings and their corresponding value.

`agent_name`::
(optional) The agent name is used by the UI to determine which settings to display.


[[apm-update-config-example]]
===== Example

[source,console]
--------------------------------------------------
PUT /api/apm/settings/agent-configuration
{
"service" : {
"name" : "frontend",
"environment" : "production"
},
"settings" : {
"transaction_sample_rate" : 0.4,
"capture_body" : "off",
"transaction_max_spans" : 500
},
"agent_name": "nodejs"
}
--------------------------------------------------

////
*******************************************************
////


[[apm-delete-config]]
==== Delete configuration

[[apm-delete-config-req]]
===== Request

`DELETE /api/apm/settings/agent-configuration`

[[apm-delete-config-req-body]]
===== Request body
`service`::
(required, object) Service identifying the configuration to delete

`name` :::
(required, string) Name of service

`environment` :::
(optional, string) Environment of service


[[apm-delete-config-example]]
===== Example

[source,console]
--------------------------------------------------
DELETE /api/apm/settings/agent-configuration
{
"service" : {
"name" : "frontend",
"environment": "production"
}
}
--------------------------------------------------

////
*******************************************************
////


[[apm-list-config]]
==== List configuration


[[apm-list-config-req]]
===== Request

`GET /api/apm/settings/agent-configuration`

[[apm-list-config-body]]
===== Response body

[source,js]
--------------------------------------------------
[
{
"agent_name": "go",
"service": {
"name": "opbeans-go",
"environment": "production"
},
"settings": {
"transaction_sample_rate": 1,
"capture_body": "off",
"transaction_max_spans": 200
},
"@timestamp": 1581934104843,
"applied_by_agent": false,
"etag": "1e58c178efeebae15c25c539da740d21dee422fc"
},
{
"agent_name": "go",
"service": {
"name": "opbeans-go"
},
"settings": {
"transaction_sample_rate": 1,
"capture_body": "off",
"transaction_max_spans": 300
},
"@timestamp": 1581934111727,
"applied_by_agent": false,
"etag": "3eed916d3db434d9fb7f039daa681c7a04539a64"
},
{
"agent_name": "nodejs",
"service": {
"name": "frontend"
},
"settings": {
"transaction_sample_rate": 1,
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
}
]
--------------------------------------------------

[[apm-list-config-example]]
===== Example

[source,console]
--------------------------------------------------
GET /api/apm/settings/agent-configuration
--------------------------------------------------

////
*******************************************************
////


[[apm-search-config]]
==== Search configuration

[[apm-search-config-req]]
===== Request

`POST /api/apm/settings/agent-configuration/search`

[[apm-search-config-req-body]]
===== Request body

`service`::
(required, object) Service identifying the configuration.

`name` :::
(required, string) Name of service

`environment` :::
(optional, string) Environment of service

`etag`::
(required) etag is sent by the agent to indicate the etag of the last successfully applied configuration. If the etag matches an existing configuration its `applied_by_agent` property will be set to `true`. Every time a configuration is edited `applied_by_agent` is reset to `false`.

[[apm-search-config-body]]
===== Response body

[source,js]
--------------------------------------------------
{
"_index": ".apm-agent-configuration",
"_id": "CIaqXXABmQCdPphWj8EJ",
"_score": 2,
"_source": {
"agent_name": "nodejs",
"service": {
"name": "frontend"
},
"settings": {
"transaction_sample_rate": 1,
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
}
}
--------------------------------------------------

[[apm-search-config-example]]
===== Example

[source,console]
--------------------------------------------------
POST /api/apm/settings/agent-configuration/search
{
"etag" : "1e58c178efeebae15c25c539da740d21dee422fc",
"service" : {
"name" : "frontend",
"environment": "production"
}
}
--------------------------------------------------

////
*******************************************************
////
2 changes: 2 additions & 0 deletions docs/apm/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ include::getting-started.asciidoc[]
include::bottlenecks.asciidoc[]

include::using-the-apm-ui.asciidoc[]

include::api.asciidoc[]
6 changes: 3 additions & 3 deletions docs/canvas/canvas-function-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ Alias: `format`
[[formatnumber_fn]]
=== `formatnumber`

Formats a number into a formatted number string using NumeralJS. For more information, see http://numeraljs.com/#format.
Formats a number into a formatted number string using the <<numeral, numeral pattern syntax>>.

*Expression syntax*
[source,js]
Expand Down Expand Up @@ -1276,7 +1276,7 @@ The `formatnumber` subexpression receives the same `context` as the `progress` f

Alias: `format`
|`string`
|A NumeralJS format string. For example, `"0.0a"` or `"0%"`. See http://numeraljs.com/#format.
|A <<numeral, numeral pattern>> string. For example, `"0.0a"` or `"0%"`.
|===

*Returns:* `string`
Expand Down Expand Up @@ -1675,7 +1675,7 @@ Default: `${font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" colo

Alias: `format`
|`string`
|A NumeralJS format string. For example, `"0.0a"` or `"0%"`. See http://numeraljs.com/#format.
|A <<numeral, numeral pattern>> string. For example, `"0.0a"` or `"0%"`.
|===

*Returns:* `render`
Expand Down
Loading

0 comments on commit f5c22f1

Please sign in to comment.