-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[apm] Annotation API documentation #65963
Conversation
Pinging @elastic/apm-ui (Team:apm) |
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.
@dgieselaar Here's a rough draft. Still some work to do, but I have a few questions first>
docs/apm/api.asciidoc
Outdated
// Basic auth or API can be used | ||
// Need to talk about permissions req'd |
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.
When using the APM API, the user needs Kibana write permissions for APM (similar to the agent configuration APIs IIRC)
Can you be more specific? My first thought was create_doc
on apm-*
indices and create_index
on apm-*
indices, as described here, but that doesn't work. Presumably because these annotations are not stored in an index that matches that pattern.
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.
Yeah, the user indexing the annotations needs those permissions for observability-annotations
, or whatever index name they set for xpack.observability.annotations.index
. Additionally, for the APM endpoint, they need feature privileges (read and write) for APM: https://www.elastic.co/guide/en/kibana/current/kibana-privileges.html.
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.
Here are the minimum privileges I was able to get to work:
Feature: APM
--> all
Index: observability-annotations
. Privileges: create_index
, create_doc
, manage
, and read
.
Does this sound correct to you? This is different from what you described, but I get 500s without manage
and read
on observability-annotations
.
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.
You're right - when we index an annotation we read it from ES immediately after so we can return the annotation as it is stored in ES. manage
is needed for checking if the index exists (view_index_metadata
works as well).
895846a
to
bff918c
Compare
@elasticmachine, run elasticsearch-ci/docs |
@bmorelli25 LMK when this needs a final review (IIRC this is not entirely finished yet?) |
@elasticmachine merge upstream |
@dgieselaar this is ready for a review! Permissions/roles will be added in a future PR as I'm not quite sure how I want to document that yet. |
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.
LGTM, just a couple of suggestions. Thanks @bmorelli25 !
|
||
`tags`:: | ||
(optional, array) Tags are used by the APM app to distinguish APM annotations from other annotations. | ||
Tags may have additional functionality in future releases. Defaults to `[apm]`. |
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 apm
tag will always be added by the endpoint, even if the user specifies other tags in the request. Should we clarify that?
docs/apm/api.asciidoc
Outdated
|
||
// AGENT CONFIG API | ||
// GET --> Feature (APM) Read | ||
// CREAT/EDIT/DELETE --> Feature (APM) All |
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.
CREAT
=> CREATE
?
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.
CREAT
C R E A T
C. R. E. A. T.
* master: [apm] Annotation API documentation (elastic#65963) [Uptime] Improve responsiveness details page (elastic#67034) skip flaky suite (elastic#66669) Revert "Integration of a static filesystem for the node_modules (elastic#47998)" (elastic#67124) Support api_integration/kibana/stats against remote hosts (elastic#53000) chore(NA): add module name mapper for src plugins on x-pack (elastic#67103) Change the error message on TSVB in order to be more user friendly (elastic#67090) [kbn/optimizer] poll parent process to avoid zombie processes (elastic#67059) [Visualize] Lazy load default editor, fix duplicated styles (elastic#66732) Bump styled-component dependencies (elastic#66611) Bump react-markdown dependencies (elastic#66615) Fix Core docs links (elastic#66977) Timelion graph is not refreshing content after searching or filtering (elastic#67023) Remove `--xpack.endpoint.enabled=true` from README.md file (elastic#67053) Move apm tutorial from apm plugin into apm_oss plugin (elastic#66432) [Logs UI] Restore call to `UsageCollector.countLogs` (elastic#67051) Remove unused license check result from LP Security plugin (elastic#66966)
* master: (21 commits) [Alerting] Hides the `alert` SavedObjects type (elastic#66719) skip flaky suite (elastic#66869) fix visual baseline tests [kbn/optimizer] require fsevents on macos (elastic#67147) [APM] Fix obscured service map connections (elastic#67129) [apm] Annotation API documentation (elastic#65963) [Uptime] Improve responsiveness details page (elastic#67034) skip flaky suite (elastic#66669) Revert "Integration of a static filesystem for the node_modules (elastic#47998)" (elastic#67124) Support api_integration/kibana/stats against remote hosts (elastic#53000) chore(NA): add module name mapper for src plugins on x-pack (elastic#67103) Change the error message on TSVB in order to be more user friendly (elastic#67090) [kbn/optimizer] poll parent process to avoid zombie processes (elastic#67059) [Visualize] Lazy load default editor, fix duplicated styles (elastic#66732) Bump styled-component dependencies (elastic#66611) Bump react-markdown dependencies (elastic#66615) Fix Core docs links (elastic#66977) Timelion graph is not refreshing content after searching or filtering (elastic#67023) Remove `--xpack.endpoint.enabled=true` from README.md file (elastic#67053) Move apm tutorial from apm plugin into apm_oss plugin (elastic#66432) ...
Summary
This PR adds documentation for the APM annotation API.
Documentation was created by running Kibana in dev mode from master and connecting to
dev-next
. Privileges needed are described in #65963 (comment). Here's an example curl request (with fake ApiKey)