Skip to content

Commit fabe32b

Browse files
authored
Merge pull request #41872 from github/repo-sync
Repo sync
2 parents b2802ec + 7498ce9 commit fabe32b

File tree

7 files changed

+174
-4
lines changed

7 files changed

+174
-4
lines changed

content/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/about-opentelemetry-metrics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ shortTitle: OpenTelemetry metrics
1515

1616
{% data reusables.enterprise.opentelemetry-migration %}
1717

18+
{% ifversion ghes = 3.18 %}
19+
1820
{% data reusables.enterprise.opentelemetry-preview %}
1921

22+
{% endif %}
23+
2024
## About OpenTelemetry metrics
2125

2226
The OpenTelemetry monitoring stack is based on industry-standard observability tools and includes various components for collecting, processing, and storing metrics. This comprehensive approach provides a complete view of your system's performance and health across all components of your {% data variables.product.prodname_ghe_server %} instance.

content/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/configuring-opentelemetry-for-your-instance.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ shortTitle: Configure OpenTelemetry
1515

1616
{% data reusables.enterprise.opentelemetry-migration %}
1717

18+
{% ifversion ghes = 3.18 %}
19+
1820
{% data reusables.enterprise.opentelemetry-preview %}
1921

22+
{% endif %}
23+
2024
## Prerequisites
2125

2226
* {% data variables.product.prodname_ghe_server %} 3.18 or later
@@ -25,6 +29,12 @@ shortTitle: Configure OpenTelemetry
2529

2630
## Enabling OpenTelemetry metrics
2731

32+
{% ifversion ghes > 3.18 %}
33+
34+
OpenTelemetry metrics are enabled by default for **new installations** of {% data variables.product.prodname_ghe_server %} 3.19 and later. Upgrades to {% data variables.product.prodname_ghe_server %} 3.19 will still have `collectd` metrics enabled by default, but you can choose to switch to OpenTelemetry metrics.
35+
36+
{% else %}
37+
2838
OpenTelemetry metrics are disabled by default. You can enable them through the {% data variables.enterprise.management_console %} or command line.
2939

3040
### Using the {% data variables.enterprise.management_console %}
@@ -47,6 +57,8 @@ OpenTelemetry metrics are disabled by default. You can enable them through the {
4757

4858
{% data reusables.enterprise.apply-configuration %}
4959

60+
{% endif %}
61+
5062
## Performance considerations
5163

5264
When configuring OpenTelemetry metrics, consider the following performance factors:

content/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/enable-advanced-dashboards.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ shortTitle: Enable advanced dashboards
1515

1616
{% data reusables.enterprise.opentelemetry-migration %}
1717

18+
{% ifversion ghes = 3.18 %}
19+
1820
{% data reusables.enterprise.opentelemetry-preview %}
1921

22+
{% endif %}
23+
2024
## Additional dashboards
2125

2226
When OpenTelemetry metrics are enabled, you can turn on advanced Grafana dashboards with enhanced visualization and monitoring capabilities.

content/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ shortTitle: OpenTelemetry metrics
1515

1616
{% data reusables.enterprise.opentelemetry-migration %}
1717

18+
{% ifversion ghes = 3.18 %}
19+
1820
{% data reusables.enterprise.opentelemetry-preview %}
21+
22+
{% endif %}

content/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/setting-up-external-monitoring-with-opentelemetry.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ type: how_to
1313
shortTitle: External monitoring OpenTelemetry
1414
---
1515

16+
{% ifversion ghes = 3.18 %}
17+
1618
{% data reusables.enterprise.opentelemetry-preview %}
1719

20+
{% endif %}
21+
1822
## External monitoring approaches
1923

2024
External monitoring with OpenTelemetry allows you to integrate your {% data variables.product.prodname_ghe_server %} instance with existing monitoring infrastructure and tools. {% data variables.product.prodname_ghe_server %} provides two primary approaches for external monitoring:
@@ -126,7 +130,7 @@ scrape_configs:
126130
scheme: https
127131
tls_config:
128132
# Set `true` only when testing with self-signed certificates
129-
insecure_skip_verify: false
133+
insecure_skip_verify: false
130134
```
131135
132136
#### Other monitoring tools

src/links/README.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
11
# Links
22

3-
This subject folder contains files that support link features on docs.github.com, such as hover card, auto generated links, and updating links for different versions and languages.
3+
This module contains the tooling and components responsible for link integrity, user experience (hover previews), and maintenance across the GitHub Docs site.
4+
5+
## Purpose & Scope
6+
7+
The `src/links` directory manages:
8+
- **Link Validation**: Ensuring all internal and external links in the documentation are valid.
9+
- **Link Maintenance**: Automated tools to update links when pages are moved or renamed.
10+
- **User Experience**: Components like "Hover Cards" that provide context when users hover over internal links.
11+
- **Compliance**: Checking for specific link patterns (e.g., `github/github` links).
12+
13+
## Architecture
14+
15+
### Components
16+
17+
- **`LinkPreviewPopover.tsx`**: A React component that renders a preview card when a user hovers over a link. It handles:
18+
- **Delay Logic**: Prevents the popover from appearing during accidental mouse-overs.
19+
- **Positioning**: Ensures the popover appears near the link without going off-screen.
20+
21+
### Libraries (`src/links/lib`)
22+
23+
- **`update-internal-links.ts`**: The core logic for refactoring links. It parses Markdown/Liquid, identifies links, and updates their `href` or title based on a provided map of changes. It handles:
24+
- Stripping Liquid conditionals to find the "pure" link.
25+
- Updating frontmatter links.
26+
- Handling anchors and query parameters.
27+
- **`excluded-links.ts`**: Configuration for links that should be ignored by validators (e.g., localhost links, specific example domains).
28+
29+
### Scripts (`src/links/scripts`)
30+
31+
- **`rendered-content-link-checker.ts`**: A comprehensive CLI tool that:
32+
- Renders content pages to HTML.
33+
- Parses the HTML to find all `<a>` and `<img>` tags.
34+
- Validates internal links (checking for 404s, broken anchors).
35+
- Validates external links (with caching and retry logic).
36+
- Reports flaws and can comment directly on GitHub Pull Requests.
37+
- **`check-github-github-links.ts`**: Ensures that we don't accidentally link to private `github/github` URLs in public documentation.
38+
- **`update-internal-links.ts`**: A CLI wrapper around the library function to perform bulk updates on the content files.
39+
40+
## Setup & Usage
41+
42+
### Validating Links
43+
44+
To run the link checker locally:
45+
46+
```bash
47+
npm run rendered-content-link-checker-cli
48+
```
49+
50+
Options:
51+
- `--level <all|critical|warning>`: Set the reporting level.
52+
- `--check-external-links`: Check external links (slower).
53+
- `--verbose`: Show detailed output.
54+
55+
### Updating Links
56+
57+
If you have moved content or changed titles and need to update references:
58+
59+
```bash
60+
npm run update-internal-links
61+
```
62+
63+
This script typically relies on the state of the `content` directory to determine what needs updating.
64+
65+
## Dependencies
66+
67+
- **`cheerio`**: Used by the link checker to parse rendered HTML.
68+
- **`src/content-render`**: The link checker needs to render pages to see the final HTML output.
69+
- **`src/frame`**: Uses `cookies` and other utilities for request context.
70+
71+
## Ownership
72+
73+
- **Team**: `@github/docs-engineering`
74+
75+
## Current State & Known Issues
76+
77+
- **Performance**: The `rendered-content-link-checker` is resource-intensive because it renders pages. It uses concurrency limits and caching (especially for external links) to mitigate this.
78+
- **False Positives**: External link checking can be flaky due to temporary network issues or anti-bot protections on target sites. The system uses a "retry and cache" strategy to reduce noise.
79+
- **Liquid Complexity**: `update-internal-links` has to use regex and heuristics to parse Markdown mixed with Liquid, which is inherently fragile compared to a full AST parser, but necessary to preserve code formatting.

src/release-notes/README.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1-
# Release notes
1+
# Release Notes
22

3-
Our release notes pages are specific to GitHub Enterprise Server (GHES). These pages list the change contained in each version of GHES.
3+
This module manages the fetching, processing, and rendering of GitHub Enterprise Server (GHES) release notes. These notes are displayed on dedicated pages (e.g., `/en/enterprise-server@3.19/admin/release-notes`) and list the features, bug fixes, and known issues for each patch release.
4+
5+
## Purpose & Scope
6+
7+
The primary goal is to:
8+
- **Parse Release Data**: Read structured YAML data containing release notes.
9+
- **Format & Sort**: Organize notes by version (major.minor) and patch level.
10+
- **Render Content**: Process Markdown and Liquid within the notes.
11+
- **Contextualize**: Inject the processed notes into the page context for rendering by React components.
12+
13+
## Architecture
14+
15+
### Data Source
16+
17+
Release notes are stored in the `data/release-notes/enterprise-server` directory.
18+
- **Origin**: The content is sourced externally and synced to this repository.
19+
- **Format**: YAML files organized by version.
20+
- **Structure**: Each file contains entries for patch releases, including sections for "Features", "Bugs", "Security", etc.
21+
22+
### Middleware
23+
24+
The core logic resides in `src/release-notes/middleware/ghes-release-notes.ts`.
25+
- **Route Detection**: It activates only for GHES release notes pages or the Admin landing page.
26+
- **Data Retrieval**: Fetches raw data using `getReleaseNotes`.
27+
- **Forced English**: Currently, it forces the content language to English (`en`) during rendering. This is a workaround because the source Markdown often lacks Liquid variables for product names, leading to undesirable translations of proper nouns (e.g., "GitHub Copilot" becoming translated literally).
28+
- **Rendering**: Uses `renderPatchNotes` to process the Markdown/Liquid content of each note.
29+
30+
### Library
31+
32+
`src/release-notes/lib/release-notes-utils.ts` provides helper functions:
33+
- **`formatReleases`**: Sorts releases and patches semantically (using `semver`). It transforms the raw data into a structured array suitable for the UI.
34+
- **`renderPatchNotes`**: Iterates through sections (features, bugs, etc.) and renders the content strings.
35+
36+
### Components
37+
38+
The frontend rendering is handled by React components in `src/release-notes/components`:
39+
- **`GHESReleaseNotes.tsx`**: The main container.
40+
- **`PatchNotes.tsx`**: Renders the details of a specific patch.
41+
42+
## Maintenance
43+
44+
### Sourcing
45+
46+
Release notes are received from an external source. **Do not manually create or edit release note files in this repository** unless specifically instructed to do so by the release process or for testing purposes.
47+
48+
The files in `data/release-notes` are the destination for this external data.
49+
50+
### URL Structure
51+
52+
- **Page**: `/en/enterprise-server@<version>/admin/release-notes`
53+
- **Anchor**: `#3.19.1` (Links to specific patch notes)
54+
55+
## Dependencies
56+
57+
- **`semver`**: Used for sorting and comparing version strings.
58+
- **`src/versions`**: Used to determine supported GHES versions (`latestStable`, `all`).
59+
- **`src/content-render`**: Used to render the Markdown content within the notes.
60+
61+
## Ownership
62+
63+
- **Team**: `@github/docs-engineering`
64+
- **Content Owners**: The Writers and Release Managers responsible for the GHES release process.
65+
66+
## Current State & Known Issues
67+
68+
- **Translation Workaround**: As mentioned, we currently force English rendering for release notes to avoid "over-translation" of product names. This is a known limitation until the source data is updated to use proper Liquid variables.
69+
- **Legacy Redirects**: The middleware handles redirects for very old versions (pre-2.20) to `enterprise.github.com`.

0 commit comments

Comments
 (0)