Skip to content
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

docs: Document privileges to read RUM source maps; Update examples #11741

Merged
merged 13 commits into from
Oct 19, 2023

Conversation

carsonip
Copy link
Member

@carsonip carsonip commented Sep 29, 2023

Motivation/summary

  • Document required privileges to read RUM source map from ES since 8.7.
  • Update API key creation examples, add agentcfg role to it.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

Closes #11722

@carsonip carsonip requested a review from a team as a code owner September 29, 2023 10:42
@carsonip carsonip added backport-8.7 Automated backport with mergify backport-8.8 Automated backport with mergify backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify labels Sep 29, 2023
@carsonip carsonip requested a review from bmorelli25 September 29, 2023 10:43
@carsonip carsonip marked this pull request as draft September 29, 2023 10:59

The above privileges should be sufficient for RUM source mapping to work properly
as long as {beatname_uc} communicates with {es} successfully.
If it fails, it may fallback to read source maps via {kib} if configured,
Copy link
Member Author

@carsonip carsonip Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[For reviewer] Keeping it slightly ambiguous to avoid describing the entire decision tree implementation detail of fallback logic. This paragraph exists to maintain the pointer to the relevant kibana docs.

@carsonip carsonip requested review from simitt and kruskall September 29, 2023 12:24
@carsonip carsonip marked this pull request as ready for review September 29, 2023 12:24
kruskall
kruskall previously approved these changes Sep 29, 2023
lahsivjar
lahsivjar previously approved these changes Oct 2, 2023
Copy link
Contributor

@lahsivjar lahsivjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small suggestion

docs/feature-roles.asciidoc Show resolved Hide resolved
@carsonip carsonip dismissed stale reviews from lahsivjar and kruskall via fa35a37 October 2, 2023 09:56
@carsonip
Copy link
Member Author

carsonip commented Oct 3, 2023

The example here may need to be updated as well: https://www.elastic.co/guide/en/apm/guide/current/beats-api-keys.html#beats-api-key-es

bmorelli25
bmorelli25 previously approved these changes Oct 3, 2023
@carsonip carsonip added the backport-8.11 Automated backport with mergify label Oct 5, 2023
}
]
},
"{beat_default_index_prefix}_sourcemap": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I'm not sure what's the point of this example, since the permissions are good enough to run apm-server with basic functionalities + rum but it is still lacking agentcfg role and monitoring role etc. I've updated this section so that it follows what's recommended in the updated RUM role. I'm wondering if we should expand this example to include all roles that allow apm-server to do everything it'll do but potentially making the doc hard to maintain, or stick with what we have now. In any case, this shouldn't block this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example is about "Create an API key for writing events" and RUM source mapping kind of falls under it but at the same time not exactly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point. I think adding agent config makes sense. We should add it to both of the examples on this page (like you did with source maps). Monitoring I think we're okay to leave separate. It already has a separate section on this page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on adding to the example;
but I don't think the index name is right .{beat_default_index_prefix}-source-map - shouldn't it be .apm-source-map?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectively the doc compiles to .apm-source-map, but I agree that it is better to hardcode it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added agentcfg role to example.

@carsonip carsonip requested a review from bmorelli25 October 17, 2023 13:15
bmorelli25
bmorelli25 previously approved these changes Oct 18, 2023
Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good;
overall the examples are outdated, as the indices do not start with apm* anymore, but with logs-*, metrics-*, traces-*. There is another issue to tackle this #10057 (comment), so if prefered, this can be tackled extra.

}
]
},
"{beat_default_index_prefix}_sourcemap": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on adding to the example;
but I don't think the index name is right .{beat_default_index_prefix}-source-map - shouldn't it be .apm-source-map?

@carsonip carsonip changed the title docs: Document privileges to read RUM source maps docs: Document privileges to read RUM source maps; Update examples Oct 19, 2023
@carsonip
Copy link
Member Author

There is another issue to tackle this #10057 (comment), so if prefered, this can be tackled extra.

Let's tackle it separately, since it may have different backport targets. Multiple files may need to be updated and it is also important that we test it properly for the writer role.

@carsonip carsonip enabled auto-merge (squash) October 19, 2023 10:10
@carsonip carsonip merged commit 00fb30e into elastic:main Oct 19, 2023
5 checks passed
mergify bot pushed a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

# Conflicts:
#	docs/legacy/configuration-rum.asciidoc
mergify bot pushed a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)
mergify bot pushed a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)
mergify bot pushed a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)
mergify bot pushed a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)
mergify bot added a commit that referenced this pull request Oct 19, 2023
…11741) (#11896)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

Co-authored-by: Carson Ip <[email protected]>
mergify bot added a commit that referenced this pull request Oct 19, 2023
…11741) (#11899)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

Co-authored-by: Carson Ip <[email protected]>
mergify bot added a commit that referenced this pull request Oct 19, 2023
…11741) (#11897)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

Co-authored-by: Carson Ip <[email protected]>
mergify bot added a commit that referenced this pull request Oct 19, 2023
…11741) (#11898)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

Co-authored-by: Carson Ip <[email protected]>
carsonip added a commit that referenced this pull request Oct 19, 2023
…11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

# Conflicts:
#	docs/legacy/configuration-rum.asciidoc
Signed-off-by: Carson Ip <[email protected]>
carsonip added a commit that referenced this pull request Oct 24, 2023
…les (backport #11741) (#11895)

* docs: Document privileges to read RUM source maps; Update examples (#11741)

* Document required privileges to read RUM source map from ES since 8.7.

* Update API key creation examples, add agentcfg role to it.

(cherry picked from commit 00fb30e)

# Conflicts:
#	docs/legacy/configuration-rum.asciidoc
Signed-off-by: Carson Ip <[email protected]>

* Fix conflict

Signed-off-by: Carson Ip <[email protected]>

---------

Signed-off-by: Carson Ip <[email protected]>
Co-authored-by: Carson Ip <[email protected]>
Co-authored-by: Carson Ip <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.7 Automated backport with mergify backport-8.8 Automated backport with mergify backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify backport-8.11 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outdated docs on privileges to use RUM sourcemapping
5 participants