-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating APM labels from kibana.yml (#144036)
* register apm config listen to config file changes and update apm labels * lint * code review * fixes
- Loading branch information
Liza Katz
authored
Oct 27, 2022
1 parent
7fe7327
commit 0f95ae4
Showing
5 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { schema } from '@kbn/config-schema'; | ||
|
||
export const apmConfigSchema = schema.object({ | ||
apm: schema.object( | ||
{ | ||
active: schema.maybe(schema.boolean()), | ||
serverUrl: schema.maybe(schema.uri()), | ||
secretToken: schema.maybe(schema.string()), | ||
globalLabels: schema.object({}, { unknowns: 'allow' }), | ||
}, | ||
{ unknowns: 'allow' } | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
import { apmConfigSchema } from '@kbn/apm-config-loader'; | ||
import type { ServiceConfigDescriptor } from '@kbn/core-base-server-internal'; | ||
|
||
const elasticConfig = schema.object({ | ||
apm: apmConfigSchema, | ||
}); | ||
|
||
export type ElasticConfigType = TypeOf<typeof elasticConfig>; | ||
|
||
export const elasticApmConfig: ServiceConfigDescriptor<ElasticConfigType> = { | ||
path: 'elastic', | ||
schema: elasticConfig, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters