New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(openapi): rule parameters documentation for observability rules #158676
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kdelemme, I have two questions:
- How can I access these files once Kibana is running?
- If recall correctly, don't we need the URL in the API definition for each endpoint?
Pinging @elastic/apm-ui (Team:APM) |
Pinging @elastic/uptime (Team:uptime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apm changes lgtm
@fkanout, you cannot access the output of these files. It's meant to be used by a script to bundle all the rules parameters. The script would search all yaml files starting with a If you want to check the schema individually, you can paste the content of the yaml file (starting after the first openapi: 3.0.1
info:
title: dummy
description: OpenAPI schema
version: '1.0'
contact:
name: Actionable Observability Team
servers:
- url: http://localhost:5601
description: local
paths:
/foo:
get:
summary: dummy
operationId: dummy
responses:
'200':
description: dummy
content:
application/json:
schema:
properties:
<PASTE_HERE> |
...ins/apm/server/routes/alerts/rule_types/docs/params_property_apm_transaction_error_rate.yaml
Outdated
Show resolved
Hide resolved
...ugins/apm/server/routes/alerts/rule_types/docs/params_property_apm_transaction_duration.yaml
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/routes/alerts/rule_types/docs/params_property_apm_error_count.yaml
Outdated
Show resolved
Hide resolved
I did some changes to the script so that it will load the spec using the file name only. Would it be ok for you to change it the root key is removed? x-pack/plugins/apm/server/routes/alerts/rule_types/docs/params_property_apm_anomaly.yaml would look like: # @kbn-doc-linker partial
required:
- windowSize
- windowUnit
- environment
- anomalySeverityType
properties:
serviceName:
type: string
description: The service name from APM
transactionType:
type: string
description: The transaction type from APM
windowSize:
type: number
example: 6
description: The window size
windowUnit:
type: string
description: The window size unit
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: The environment from APM
anomalySeverityType:
type: string
description: The anomaly threshold value
enum:
- critical
- major
- minor
- warning It's feasible to make it work using the file name only but I'm thinking about leaving the header comment just to make it easier for developers to understand/trace what happens to this file. Any thoughts? |
@jcger Done |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @kdelemme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infra changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uptime changes LGTM
Resolves https://github.com/elastic/actionable-observability/issues/11
Summary
This PR adds the openAPI documentation for the following observability rules: