Skip to content

Add prefer-blockquote-vs-docsy-alerts rule, apply rule to en pages, plus some copyedits#9659

Merged
chalin merged 3 commits intoopen-telemetry:mainfrom
chalin:chalin-m24-alert-syntax-check-2026-0415
Apr 15, 2026
Merged

Add prefer-blockquote-vs-docsy-alerts rule, apply rule to en pages, plus some copyedits#9659
chalin merged 3 commits intoopen-telemetry:mainfrom
chalin:chalin-m24-alert-syntax-check-2026-0415

Conversation

@chalin
Copy link
Copy Markdown
Contributor

@chalin chalin commented Apr 15, 2026

  • Contributes to Provide agent-friendly content & support #9449
  • Adds a custom markdownlint rule that flags Docsy alert shortcode calls
  • Converts some alert shortcode calls that have creeped in.
    • For the most part, I've not edited the alert title or text, except the one in Go Sample (see inline comment)
  • Registers the rule in .markdownlint-cli2.yaml and keeps it disabled in the root .markdownlint.yaml with a short comment
  • Enables the rule only under content/en through content/en/.markdownlint.yaml
  • Documents intended behavior, example patterns, and Hugo escaped shortcode delimiters in scripts/_md-rules/prefer-blockquote-vs-docsy-alerts/README.md with a link to Hugo’s escaping documentation
  • Adds Node tests for normal calls, fenced and indented cases, inline literals, and commented Hugo delimiter forms
  • Suppresses the rule on the Spring Boot annotations page where inline shortcode examples are intentional
  • Adds test:local-tools npm script, documents it in site docs.
    • Note: that this will be run as a part of CI via test:compound-tests
  • Preview: e.g., https://deploy-preview-9659--opentelemetry.netlify.app/docs/languages/go/sampling/#custom-samplers

@chalin chalin requested a review from a team as a code owner April 15, 2026 13:35
@otelbot-docs otelbot-docs bot requested review from a team April 15, 2026 13:35
@github-actions github-actions bot added dependencies Pull requests that update a dependency file sig:go sig:java labels Apr 15, 2026
@otelbot-docs otelbot-docs bot added missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer missing:sig-approval Co-owning SIG didn't provide an approval labels Apr 15, 2026
@chalin chalin added the CI/infra Repo CI & infrastructure label Apr 15, 2026
Comment on lines +57 to +70
> [!IMPORTANT] Preserve parent tracestate
>
> In `ShouldSample`, you _must_ preserve the parent's tracestate in your
> `SamplingResult`. Failing to do so breaks context propagation in distributed
> systems that rely on tracestate for passing vendor-specific or
> application-specific trace data.
>
> Extract the tracestate from the parent span context:
>
> ```go
> psc := trace.SpanContextFromContext(parameters.ParentContext)
> ```
>
> Pass `psc.TraceState()` through when you build your `SamplingResult`.
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.

@tiffany76 @open-telemetry/go-approvers et all: note the copyedits applied for this alert. Let me know if you are ok with them.

Copy link
Copy Markdown
Contributor Author

@chalin chalin Apr 15, 2026

Choose a reason for hiding this comment

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

For context, the original alert prose was added via:

/cc @pratik-mahalle @vitorvasc @svrnm

@otelbot-docs otelbot-docs bot requested a review from a team April 15, 2026 13:46
@otelbot-docs otelbot-docs bot added ready-to-be-merged This PR is ready to be merged by a maintainer and removed missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer missing:sig-approval Co-owning SIG didn't provide an approval labels Apr 15, 2026
@chalin
Copy link
Copy Markdown
Contributor Author

chalin commented Apr 15, 2026

Thanks @vitorvasc.

@tiffany76 @open-telemetry/go-approvers et all: note the copyedits applied for this alert. Let me know if you are ok with them.

Will merge now. Feedback is still welcome.

@chalin chalin merged commit 4251379 into open-telemetry:main Apr 15, 2026
25 checks passed
@chalin chalin deleted the chalin-m24-alert-syntax-check-2026-0415 branch April 15, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/infra Repo CI & infrastructure dependencies Pull requests that update a dependency file lang:es lang:ja lang:pt lang:zh ready-to-be-merged This PR is ready to be merged by a maintainer sig:go sig:java

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants