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

Update APM URLs #3674

Merged
merged 14 commits into from
Mar 27, 2024
Merged

Update APM URLs #3674

merged 14 commits into from
Mar 27, 2024

Conversation

bmorelli25
Copy link
Member

@bmorelli25 bmorelli25 commented Mar 13, 2024

Summary

This PR updates our APM documentation by prepending the APM documentation paths with apm-.

Task list

URLs not updated

The following URLs had paths already prepended with apm- and thus do not need redirects:

/apm.html
/apm-agent-auth.html
/apm-breaking.html
/apm-data-security.html
/apm-data-streams.html
/apm-distributed-tracing.html
/apm-integration-upgrade-steps.html
/apm-integration-upgrade-steps-ess.html
/apm-integration-upgrade-steps.html
/apm-k8s-attacher.html
/apm-mutating-admission-webhook.html
/apm-rum.html
/apm-server-configuration.html
/apm-server-starting.html

Related

For #3573.

Process

Documenting my process below in case we need to make similar changes in the future. Note that this is absolutely not performant, but it somehow does work! The bash file in step two takes ~3 minutes to run.

  1. I replaced all APM headings in VSC:
Find: \[\[(.+)\]\]
Replace: [[apm-$1]]
Include: docs/en/observability/apm
  1. I found all headings in the APM documentation that were prepended with apm-*. For each heading, this script searches for links missing apm-* and automatically adds them.
grep -Rih "\[\[apm-" /Users/brandon/Documents/GitHub/observability-docs/docs/en/observability/apm > headings.txt
cat headings.txt | while read line
do
  data=$(echo $line | sed -r 's/\[\[apm-(.*)\]\]$/\1/')
  echo $data
  # Update internal links
  sed -i '' "s/\<\<$data/\<\<apm-$data/g" $(find . -type f -name "*.asciidoc" 2>/dev/null)
  # Update external links (mostly in redirects file)
  sed -i '' "s/\observability-guide\}\/$data/\observability-guide\}\/apm-$data/g" $(find . -type f -name "*.asciidoc" 2>/dev/null)
done

Copy link
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Mar 13, 2024
@bmorelli25

This comment was marked as outdated.

@bmorelli25

This comment was marked as outdated.

@bmorelli25 bmorelli25 marked this pull request as ready for review March 14, 2024 03:10
@bmorelli25 bmorelli25 requested a review from a team as a code owner March 14, 2024 03:10
@bmorelli25 bmorelli25 self-assigned this Mar 14, 2024
@bmorelli25 bmorelli25 added backport-8.13 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Mar 14, 2024
@bmorelli25 bmorelli25 requested a review from simitt March 14, 2024 03:12
@simitt
Copy link
Contributor

simitt commented Mar 19, 2024

@bmorelli25 the broken links sections mean, that these links will forward to the new pages?

I'm generally +1 on the changes, but it doesn't update the release note URLs, which I think are especially misleading with e.g. https://www.elastic.co/guide/en/observability/current/release-notes-8.12.html. Is this something that you intend to pick up later?

This comment was marked as outdated.

@bmorelli25
Copy link
Member Author

@bmorelli25 the broken links sections mean, that these links will forward to the new pages?

Sorry, those comments were for me for debugging purposes. You can ignore them.

I'm generally +1 on the changes, but it doesn't update the release note URLs, which I think are especially misleading with e.g. https://www.elastic.co/guide/en/observability/current/release-notes-8.12.html. Is this something that you intend to pick up later?

Fair point. Working on that in conjunction with this PR now.

@elastic elastic deleted a comment from mergify bot Mar 19, 2024
@bmorelli25
Copy link
Member Author

Okay, this PR is ready for review again. This PR prepends all APM URLs, including release note URLs, with apm-. I plan on merging this PR and backporting to 8.13. When the 8.13 release goes out, we'll ask marketing to implement the redirects listed in this google sheet.

simitt
simitt previously approved these changes Mar 20, 2024
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.

LGTM;
@bmorelli25 are you taking care of the follow up actions mentioned in the related issue?
You'll need to collaborate with @jmlrt on updating the URLs in a follow up PR.

mdbirnstiehl
mdbirnstiehl previously approved these changes Mar 21, 2024
Copy link
Contributor

@mdbirnstiehl mdbirnstiehl left a comment

Choose a reason for hiding this comment

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

👍

…into update-apm-urls

# Conflicts:
#	docs/en/observability/apm/command-reference.asciidoc
#	docs/en/observability/apm/configure/agent-config.asciidoc
#	docs/en/observability/apm/configure/logging.asciidoc
#	docs/en/observability/apm/configure/outputs/elasticsearch.asciidoc
#	docs/en/observability/apm/configure/outputs/kafka.asciidoc
#	docs/en/observability/apm/debugging.asciidoc
#	docs/en/observability/apm/feature-roles.asciidoc
#	docs/en/observability/apm/getting-started-apm-server.asciidoc
#	docs/en/observability/apm/https.asciidoc
#	docs/en/observability/apm/monitoring/monitoring-beats.asciidoc
#	docs/en/observability/apm/monitoring/monitoring-internal-collection.asciidoc
#	docs/en/observability/apm/monitoring/monitoring-metricbeat.asciidoc
#	docs/en/observability/apm/otel-limitations.asciidoc
#	docs/en/observability/apm/repositories.asciidoc
#	docs/en/observability/apm/shared-docker.asciidoc
#	docs/en/observability/apm/shared-ssl-logstash-config.asciidoc
#	docs/en/observability/apm/shared-systemd.asciidoc
@bmorelli25 bmorelli25 dismissed stale reviews from mdbirnstiehl and simitt via 2028193 March 25, 2024 17:22
Copy link
Contributor

@mdbirnstiehl mdbirnstiehl left a comment

Choose a reason for hiding this comment

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

🐦

@bmorelli25 bmorelli25 merged commit c60b759 into elastic:main Mar 27, 2024
3 checks passed
mergify bot pushed a commit that referenced this pull request Mar 27, 2024
(cherry picked from commit c60b759)
@bmorelli25 bmorelli25 deleted the update-apm-urls branch March 27, 2024 19:37
bmorelli25 added a commit that referenced this pull request Mar 27, 2024
(cherry picked from commit c60b759)

Co-authored-by: Brandon Morelli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.13 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants