-
Notifications
You must be signed in to change notification settings - Fork 526
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
Observability intake APIs #15837
base: main
Are you sure you want to change the base?
Observability intake APIs #15837
Conversation
This pull request does not have a backport label. Could you fix it @lcawl? 🙏
|
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.
The files in /docs/spec/rumv3
and /docs/spec/v2
are auto-generated from code in https://github.com/elastic/apm-data/blob/main/input/elasticapm/internal/modeldecoder/generator/cmd/main.go and then copied to the apm-server repo. The spec files are not mainly used for docs but for the development workflow. They reflect the API between elastic apm agents and apm-server and are used for automated contract testing.
Changing file format to yaml
, would require
- adapting the generation code
- adapting the automation for contract testing between any elastic apm agent and the intake protofol
@lcawl I am not convinced that switching these specs to yaml
is the way forward. I'd much rather not have the API documented to this level, than changing the existing code and behaviour due to some documentation restrictions. The API docs are mainly relevant for anyone developing a custom client against it, which is not something we officially support. If needed, the spec files would still be available in the repositories, just not be part of official docs. There is also no active development planned for the APIs.
cc @raultorrecilla for awareness and further conversations.
I guess in that case if you still want some version of these API docs published, rather than changing to yaml and commenting out the problematic sections, we could just use overlays to remove those sections as a kind of post-processing. I will try drafting that up in this PR. |
@lcawl maybe we could only publish the API paths and then link to the |
I've reset the PR to do the fixes via overlays and added details in the introduction about where to find the source files. Let me know what you think!
IMO that sounds like something that should be explicitly added to the |
This PR makes the following changes to the OpenAPI files:
patternProperties
, which is not yet supported in Bump.shadditionalProperties
totrue
(if desired, we can put an explanation of the naming pattern in the descriptions and/or add more details about the supported objects there too, but this will be more effort to maintain if the original source files change).anyOf
andallOf
were being used to indicate when/if properties are required, since this also seems to cause problems in Bump.shmake api-docs
command to apply the overlaysThe goal is to be able to publish this content on https://www.elastic.co/docs/api/ and not migrate the APM Server API to the new docs system.
Here's an example of a preview before and after the fixes:
Before
After
Next steps
I think that what's being asserted in places like this:
Is the same as what's being asserted in the description:
So in my opinion given that this OpenAPI document is used only for documentation, it's sufficient to explain these dependencies in the text and we don't need to wait for additional functionality to publish these docs.