Skip to content

[chore] Standardize markdown#14761

Open
am1r021 wants to merge 21 commits intoopen-telemetry:mainfrom
am1r021:standardize-markdown
Open

[chore] Standardize markdown#14761
am1r021 wants to merge 21 commits intoopen-telemetry:mainfrom
am1r021:standardize-markdown

Conversation

@am1r021
Copy link
Copy Markdown
Contributor

@am1r021 am1r021 commented Mar 12, 2026

Description

This change introduces the following Markdown lint standards:

  • MD001
  • MD012
  • MD014

Link to tracking issue

Fixes part of #14731

Testing

No testing is necessary since this mostly touches markdown files.

Documentation

No additional documentation is needed since this fixes styling.

@am1r021 am1r021 changed the title Standardize markdown [chore] Standardize markdown Mar 12, 2026
CONTRIBUTING.md Outdated
* Provide a configuration structure which defines the configuration of the component
* Provide the implementation that performs the component operation

For more details on components, see the [Adding New Components](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-new-components) document and the tutorial [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) which provides a detailed example of building a component.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not sure this is related to mdlint rules.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These links were broken because of the standardization changes shifting what lines the headers were on. It was caught in CI: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/23018206609/job/66847201360. The links referencing specific lines became invalid due to enforcing MD012 since it shifts the lines that references point to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, I'm not sure why the job caught this link breakage just now, since the adding new components header has been removed before this PR. I'd imagine the lines shifting triggered a deeper review of the links since this link wasn't necessarily broken, it just wasn't linking to a specific header, just the file in general.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't in this case the link be pointing to Donating New Components which is now a dedicated doc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

# Component Status Reporting

Component status reporting is a collector feature that allows components to report their status (aka health) via status events to extensions. In order for an extension receive these events it must implement the [StatusWatcher interface](https://github.com/open-telemetry/opentelemetry-collector/blob/f05f556780632d12ef7dbf0656534d771210aa1f/extension/extension.go#L54-L63).
Component status reporting is a collector feature that allows components to report their status (aka health) via status events to extensions. In order for an extension receive these events it must implement the [Watcher interface](https://github.com/open-telemetry/opentelemetry-collector/blob/main/component/componentstatus/status.go).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is this link changing?

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 13, 2026

Choose a reason for hiding this comment

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

StatusWatcher was changed to Watcher as per line 1128 in CHANGELOG-API.md. The line references became invalidated due to enforcing MD012.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line references should still work and be maintained. Also previously this was pinned to a commit rather than main. It would be better to have this pinned to a tag that way the link is less likely to get broken.

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 16, 2026

Choose a reason for hiding this comment

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

I've updated the link to

This references the line the new interface is on and also pins to a commit.

Comment on lines +87 to +86
The collector has the concept of a shared component. A shared component is represented as a single component to the collector, but represents multiple logical components elsewhere. The most common usage of this is the OTLP receiver, where a single shared component represents a logical instance for each signal: traces, metrics, and logs (although this can vary based on configuration). When a shared component reports status it must report an event for each of the logical instances it represents. In the current implementation, shared component reports status for all its logical instances during [Start](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L89-L98) and [Shutdown](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L105-L117). It also [modifies the ReportStatus method](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L34-L44) on component.TelemetrySettings to report status for each logical instance when called.
The collector has the concept of a shared component. A shared component is represented as a single component to the collector, but represents multiple logical components elsewhere. The most common usage of this is the OTLP receiver, where a single shared component represents a logical instance for each signal: traces, metrics, and logs (although this can vary based on configuration). When a shared component reports status it must report an event for each of the logical instances it represents. In the current implementation, shared component reports status for all its logical instances during [Start](https://github.com/open-telemetry/opentelemetry-collector/blob/main/internal/sharedcomponent/sharedcomponent.go) and [Shutdown](https://github.com/open-telemetry/opentelemetry-collector/blob/main/internal/sharedcomponent/sharedcomponent.go). It also [wraps the host's Report method](https://github.com/open-telemetry/opentelemetry-collector/blob/main/internal/sharedcomponent/sharedcomponent.go) to report status for each logical instance when called.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As above

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 13, 2026

Choose a reason for hiding this comment

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

The lines have shifted on this one as well. I'd be happy to update the line references, and as I think of it more, it seems like the way to go, but it's important to note that the CI is not presently and actively picking up when documentation headers are changed and how that interacts with the links throughout the documentation. I'd be happy to take a look into that too.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeap update the line numbers & ideally also pin it to a tag rather than main. That way the links are less likely to get broken.

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 16, 2026

Choose a reason for hiding this comment

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

Fixed. Just a heads up, lychee will error out on this because it cannot access the page, even though the link is reachable.

docs/release.md Outdated
Comment on lines +7 to +9
1. The [Core](#releasing-opentelemetry-collector-core-release-manager) collector, including the collector builder CLI tool.
2. The [Contrib](#releasing-opentelemetry-collector-contrib-contrib-release-manager) collector repository, containing Collector components.
3. The [artifacts](#producing-the-artifacts-releases-release-manager)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As above

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 13, 2026

Choose a reason for hiding this comment

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

These headers were changed in the documentation previously but not updated, and the link discrepancies were picked up in the CI on this PR.

Copy link
Copy Markdown
Contributor Author

@am1r021 am1r021 Mar 16, 2026

Choose a reason for hiding this comment

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

I've updated these links as suggested to point commit as well so that they don't break.

@thompson-tomo
Copy link
Copy Markdown

thompson-tomo commented Mar 17, 2026

@am1r021 can you also add a lychee remap rule https://lychee.cli.rs/recipes/migration/ to convert

https://github.com/(.*)#L[0-9]+(-[0-9])? to https://github.com/$1 which should fix the CI issue.

Also you might want to add the file used for tests to a .markdownlintignore file.

am1r021 and others added 5 commits March 25, 2026 14:19
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
@am1r021 am1r021 force-pushed the standardize-markdown branch from 708eef6 to e7c7ff9 Compare March 25, 2026 21:53
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 7 untouched benchmarks
⏩ 76 skipped benchmarks1


Comparing am1r021:standardize-markdown (53776ce) with main (ba01037)

Open in CodSpeed

Footnotes

  1. 76 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@am1r021 am1r021 requested a review from thompson-tomo March 25, 2026 22:15
am1r021 and others added 2 commits March 26, 2026 10:38
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
@am1r021 am1r021 requested a review from thompson-tomo March 26, 2026 17:38
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (ba01037) to head (53776ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14761      +/-   ##
==========================================
- Coverage   91.32%   91.30%   -0.03%     
==========================================
  Files         697      697              
  Lines       44459    44459              
==========================================
- Hits        40604    40595       -9     
- Misses       2716     2722       +6     
- Partials     1139     1142       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

There are some link changes that I would rather not change and that I think are not related to the markdownlint new rules. Could we revert those/fix things differently before moving forward?

# Component Status Reporting

Component status reporting is a collector feature that allows components to report their status (aka health) via status events to extensions. In order for an extension receive these events it must implement the [StatusWatcher interface](https://github.com/open-telemetry/opentelemetry-collector/blob/f05f556780632d12ef7dbf0656534d771210aa1f/extension/extension.go#L54-L63).
Component status reporting is a collector feature that allows components to report their status (aka health) via status events to extensions. In order for an extension receive these events it must implement the [Watcher interface](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/component/componentstatus/status.go#L35).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this change needed? The previous link is valid. We don't typically keep RFCs up to date when further changes have happened, I think we should revert this

**sharedcomponent**

The collector has the concept of a shared component. A shared component is represented as a single component to the collector, but represents multiple logical components elsewhere. The most common usage of this is the OTLP receiver, where a single shared component represents a logical instance for each signal: traces, metrics, and logs (although this can vary based on configuration). When a shared component reports status it must report an event for each of the logical instances it represents. In the current implementation, shared component reports status for all its logical instances during [Start](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L89-L98) and [Shutdown](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L105-L117). It also [modifies the ReportStatus method](https://github.com/open-telemetry/opentelemetry-collector/blob/31ac3336d956d93abede6db76453730613e1f076/internal/sharedcomponent/sharedcomponent.go#L34-L44) on component.TelemetrySettings to report status for each logical instance when called.
The collector has the concept of a shared component. A shared component is represented as a single component to the collector, but represents multiple logical components elsewhere. The most common usage of this is the OTLP receiver, where a single shared component represents a logical instance for each signal: traces, metrics, and logs (although this can vary based on configuration). When a shared component reports status it must report an event for each of the logical instances it represents. In the current implementation, shared component reports status for all its logical instances during [Start](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/internal/sharedcomponent/sharedcomponent.go#L89-L98) and [Shutdown](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/internal/sharedcomponent/sharedcomponent.go#L105-L117). It also [wraps the host's Report method](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/internal/sharedcomponent/sharedcomponent.go#L34-L44) to report status for each logical instance when called.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto, I don't think we should change the links here

Comment on lines -7 to +9
1. The [Core](#releasing-opentelemetry-collector) collector, including the collector builder CLI tool.
2. The [Contrib](#releasing-opentelemetry-collector-contrib) collector repository, containing Collector components.
3. The [artifacts](#producing-the-artifacts)
1. The [Core](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/docs/release.md#releasing-opentelemetry-collector-core-release-manager) collector, including the collector builder CLI tool.
2. The [Contrib](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/docs/release.md#releasing-opentelemetry-collector-contrib-contrib-release-manager) collector repository, containing Collector components.
3. The [artifacts](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.147.0/docs/release.md#producing-the-artifacts-releases-release-manager)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rather keep these as relative links

* Provide the implementation that performs the component operation

For more details on components, see the [Donating New Components](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#donating-new-components) document and the tutorial [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) which provides a detailed example of building a component.
For more details on components, see the [Donating New Components](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.147.0/docs/new-components.md) document and the tutorial [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) which provides a detailed example of building a component.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer to keep the link to main here. I understand this may not be the best practice for linking to an arbitrary repo, but this is a repo we control so I feel confident we can keep it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants