Skip to content

Commit

Permalink
Merge branch '7.16' into ua/fix_duped_copy_in_header_description
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Nov 24, 2021
2 parents 6fa5a80 + d3a15d0 commit f879e52
Show file tree
Hide file tree
Showing 50 changed files with 901 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ steps:
- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
queue: c2-4
queue: c2-8
key: checks
timeout_in_minutes: 120

Expand Down
2 changes: 2 additions & 0 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export TEST_BROWSER_HEADLESS=1

export ELASTIC_APM_ENVIRONMENT=ci
export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1
export ELASTIC_APM_SERVER_URL=https://kibana-ci-apm.apm.us-central1.gcp.cloud.es.io
export ELASTIC_APM_SECRET_TOKEN=7YKhoXsO4MzjhXjx2c

if is_pr; then
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:collect-apm"* ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ readonly links: {
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | |
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record&lt;string, string&gt;; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record&lt;string, string&gt;; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; readonly autocompleteChanges: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record&lt;string, string&gt;; readonly ml: Record&lt;string, string&gt;; readonly transforms: Record&lt;string, string&gt;; readonly visualize: Record&lt;string, string&gt;; readonly apis: Readonly&lt;{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }&gt;; readonly observability: Readonly&lt;{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }&gt;; readonly alerting: Record&lt;string, string&gt;; readonly maps: Record&lt;string, string&gt;; readonly monitoring: Record&lt;string, string&gt;; readonly security: Readonly&lt;{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }&gt;; readonly spaces: Readonly&lt;{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }&gt;; readonly watcher: Record&lt;string, string&gt;; readonly ccs: Record&lt;string, string&gt;; readonly plugins: Record&lt;string, string&gt;; readonly snapshotRestore: Record&lt;string, string&gt;; readonly ingest: Record&lt;string, string&gt;; readonly fleet: Readonly&lt;{ datastreamsILM: string; beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }&gt;; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record&lt;string, string&gt;; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record&lt;string, string&gt;; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; readonly autocompleteChanges: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record&lt;string, string&gt;; readonly ml: Record&lt;string, string&gt;; readonly transforms: Record&lt;string, string&gt;; readonly visualize: Record&lt;string, string&gt;; readonly apis: Readonly&lt;{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }&gt;; readonly observability: Readonly&lt;{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }&gt;; readonly alerting: Record&lt;string, string&gt;; readonly maps: Readonly&lt;{ guide: string; importGeospatialPrivileges: string; }&gt;; readonly monitoring: Record&lt;string, string&gt;; readonly security: Readonly&lt;{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }&gt;; readonly spaces: Readonly&lt;{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }&gt;; readonly watcher: Record&lt;string, string&gt;; readonly ccs: Record&lt;string, string&gt;; readonly plugins: Record&lt;string, string&gt;; readonly snapshotRestore: Record&lt;string, string&gt;; readonly ingest: Record&lt;string, string&gt;; readonly fleet: Readonly&lt;{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }&gt;; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |

3 changes: 2 additions & 1 deletion packages/kbn-apm-config-loader/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ RUNTIME_DEPS = [
TYPES_DEPS = [
"//packages/elastic-safer-lodash-set",
"//packages/kbn-utils",
"@npm//elastic-apm-node",
"@npm//@elastic/apm-rum",
"@npm//@types/jest",
"@npm//@types/js-yaml",
"@npm//@types/lodash",
"@npm//@types/node",
"@npm//elastic-apm-node",
]

jsts_transpiler(
Expand Down
12 changes: 7 additions & 5 deletions packages/kbn-apm-config-loader/src/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ describe('ApmConfiguration', () => {
"globalLabels": Object {},
"logUncaughtExceptions": true,
"metricsInterval": "30s",
"secretToken": "7YKhoXsO4MzjhXjx2c",
"serverUrl": "https://kibana-ci-apm.apm.us-central1.gcp.cloud.es.io",
"propagateTracestate": true,
"secretToken": "JpBCcOQxN81D5yucs2",
"serverUrl": "https://kibana-cloud-apm.apm.us-east-1.aws.found.io",
"serviceName": "serviceName",
"serviceVersion": "8.0.0",
"transactionSampleRate": 1,
Expand All @@ -117,11 +118,12 @@ describe('ApmConfiguration', () => {
},
"logUncaughtExceptions": true,
"metricsInterval": "120s",
"secretToken": "7YKhoXsO4MzjhXjx2c",
"serverUrl": "https://kibana-ci-apm.apm.us-central1.gcp.cloud.es.io",
"propagateTracestate": true,
"secretToken": "JpBCcOQxN81D5yucs2",
"serverUrl": "https://kibana-cloud-apm.apm.us-east-1.aws.found.io",
"serviceName": "serviceName",
"serviceVersion": "8.0.0",
"transactionSampleRate": 1,
"transactionSampleRate": 0.1,
}
`);
});
Expand Down
26 changes: 15 additions & 11 deletions packages/kbn-apm-config-loader/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { execSync } from 'child_process';
import { getDataPath } from '@kbn/utils';
import { readFileSync } from 'fs';
import type { AgentConfigOptions } from 'elastic-apm-node';
import type { AgentConfigOptions as RUMAgentConfigOptions } from '@elastic/apm-rum';

// https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html
const DEFAULT_CONFIG: AgentConfigOptions = {
Expand All @@ -22,28 +23,30 @@ const DEFAULT_CONFIG: AgentConfigOptions = {
globalLabels: {},
};

const CENTRALIZED_SERVICE_BASE_CONFIG: AgentConfigOptions = {
serverUrl: 'https://kibana-ci-apm.apm.us-central1.gcp.cloud.es.io',
const CENTRALIZED_SERVICE_BASE_CONFIG: AgentConfigOptions | RUMAgentConfigOptions = {
serverUrl: 'https://kibana-cloud-apm.apm.us-east-1.aws.found.io',

// The secretToken below is intended to be hardcoded in this file even though
// it makes it public. This is not a security/privacy issue. Normally we'd
// instead disable the need for a secretToken in the APM Server config where
// the data is transmitted to, but due to how it's being hosted, it's easier,
// for now, to simply leave it in.
secretToken: '7YKhoXsO4MzjhXjx2c',
secretToken: 'JpBCcOQxN81D5yucs2',

breakdownMetrics: true,
captureSpanStackTraces: false,
centralConfig: false,
metricsInterval: '30s',
captureSpanStackTraces: false,
propagateTracestate: true,
transactionSampleRate: 1.0,
breakdownMetrics: true,
};

const CENTRALIZED_SERVICE_DIST_CONFIG: AgentConfigOptions = {
metricsInterval: '120s',
breakdownMetrics: false,
captureBody: 'off',
captureHeaders: false,
breakdownMetrics: false,
metricsInterval: '120s',
transactionSampleRate: 0.1,
};

export class ApmConfiguration {
Expand Down Expand Up @@ -215,10 +218,11 @@ export class ApmConfiguration {
return {
globalLabels: {
branch: process.env.GIT_BRANCH || '',
targetBranch: process.env.PR_TARGET_BRANCH || '',
ciBuildNumber: process.env.BUILD_NUMBER || '',
isPr: process.env.GITHUB_PR_NUMBER ? true : false,
prId: process.env.GITHUB_PR_NUMBER || '',
targetBranch: process.env.GITHUB_PR_TARGET_BRANCH || '',
ciBuildNumber: process.env.BUILDKITE_BUILD_NUMBER || '',
ciBuildId: process.env.BUILDKITE_BUILD_ID || '',
isPr: process.env.BUILDKITE_PULL_REQUEST ? true : false,
prId: process.env.BUILDKITE_PULL_REQUEST || '',
},
};
}
Expand Down
2 changes: 0 additions & 2 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ export class DocLinksService {
elasticAgent: `${FLEET_DOCS}elastic-agent-installation.html`,
beatsAgentComparison: `${FLEET_DOCS}beats-agent-comparison.html`,
datastreams: `${FLEET_DOCS}data-streams.html`,
datastreamsILM: `${FLEET_DOCS}data-streams.html#data-streams-ilm`,
datastreamsNamingScheme: `${FLEET_DOCS}data-streams.html#data-streams-naming-scheme`,
installElasticAgent: `${FLEET_DOCS}install-fleet-managed-elastic-agent.html`,
upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`,
Expand Down Expand Up @@ -760,7 +759,6 @@ export interface DocLinksStart {
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
Expand Down
Loading

0 comments on commit f879e52

Please sign in to comment.