Skip to content

Perl otlp endpoint protocol mismatch - #2309

Merged
aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
Omnideth:perl-otlp-endpoint-protocol-mismatch
Oct 28, 2026
Merged

aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
Omnideth:perl-otlp-endpoint-protocol-mismatch

Conversation

@Omnideth

Copy link
Copy Markdown
Contributor

**Closes #2308 **

Layered after: PR #2306

  • Replace WithOtlpExporter() with
    WithOtlpExporterIfEndpointAvailable(OtlpProtocol.HttpJson).
  • Use http/json, not http/protobuf. Both are supported by Perl and the dashboard, but JSON does
    not require Google::ProtocolBuffers::Dynamic. Requiring protobuf without that module only
    falls back to JSON after a warning.
  • Remove the manual standard and Perl-specific protocol assignments.
  • In run mode, add exporter selections only after Aspire has injected
    OTEL_EXPORTER_OTLP_ENDPOINT.
  • In run mode, set the Perl-specific exporter, endpoint, protocol, and header variables to an
    internal deferred value provider. It reads the matching standard variable when Aspire resolves
    values, after every environment callback has run. If the standard variable has been removed,
    the Perl-specific variable resolves to no value.
  • Keep literal standard and Perl-specific exporter selections in publish mode; deployment targets
    supply the endpoint and protocol later from the OtlpExporterAnnotation.
  • Add HTTP OTLP endpoint URLs to the C# and TypeScript Perl example profiles.
  • Document the HTTP OTLP requirement, gRPC-only behavior, and OTEL_PERL_* precedence in the README.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Since I rebased on the outstanding PR noted above, I don't expect any conflicts this time when it goes to main.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:50
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2309

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2309"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review identified no blocking issues in the configuration changes or regression coverage; builds and tests were not run.

No open issues 🎉

1 file not reviewed
  • examples/perl/CpanmApiIntegration.AppHost.TypeScript/package-lock.json: Generated file
What changed in this PR

This PR fixes #2308 by aligning Perl telemetry with the dashboard’s HTTP OTLP endpoint and JSON protocol. It also includes installer identity checks and certificate-trust remediation layered after #2306.

Changes:

  • Select HTTP/JSON for Perl telemetry and defer Perl-specific variables to final standard values in run mode.
  • Reject installer-name collisions and configure certificate trust from each resource’s own context.
  • Add regression tests, document configuration behavior, and enable HTTP OTLP endpoints in examples.
File Description
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​WithPackageTests.cs Tests installer collisions and reuse after command changes.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​WithCertificateTrustTests.cs Tests resource-specific certificate trust and isolates process-environment changes.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​PublishModeWiringTests.cs Verifies publish mode retains module requests without installers.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​OtlpConfigurationTests.cs Covers endpoint selection, overrides, mirroring, and publish behavior.
src/​CommunityToolkit.Aspire.Hosting.Perl/​README.md Documents OTLP requirements, installer collisions, and certificate trust.
src/​CommunityToolkit.Aspire.Hosting.Perl/​PerlOtelEnvironmentVariableMirror.cs Adds deferred resolution of Perl-specific telemetry variables.
src/​CommunityToolkit.Aspire.Hosting.Perl/​PerlAppResourceBuilderExtensions.PackageManager.cs Validates installer identity and wires resource-specific certificate trust.
src/​CommunityToolkit.Aspire.Hosting.Perl/​PerlAppResourceBuilderExtensions.cs Selects HTTP/JSON and configures telemetry variables by execution mode.
src/​CommunityToolkit.Aspire.Hosting.Perl/​Annotations/​PerlModuleInstallerAnnotation.cs Records the original module identity for installer validation.
examples/​perl/​CpanmApiIntegration.AppHost/​Properties/​launchSettings.json Adds HTTP OTLP endpoints to C# launch profiles.
examples/​perl/​CpanmApiIntegration.AppHost.TypeScript/​package-lock.json Updates peer-dependency metadata.
examples/​perl/​CpanmApiIntegration.AppHost.TypeScript/​aspire.config.json Adds the TypeScript example’s HTTP OTLP endpoint.

Review effort: Balanced

@aaronpowell

Copy link
Copy Markdown
Member

Because it branched a branch it's now got a merge conflict.

…matching between aspire and called perl resources.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Omnideth
Omnideth force-pushed the perl-otlp-endpoint-protocol-mismatch branch from cf8f9d5 to e01c025 Compare October 28, 2026 01:31
@Omnideth

Copy link
Copy Markdown
Contributor Author

Was able to address and if that was the only blocker, it's ready for merge now.

@aaronpowell
aaronpowell merged commit fa69bc1 into CommunityToolkit:main Oct 28, 2026
16 checks passed
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.

Perl - OTLP Endpoint and Protocol Mismatch

3 participants