Skip to content

feat: test OTLP exporter TLS end to end#119

Open
krishankumar01 wants to merge 5 commits into
masterfrom
kkumar-gcc/example-tls
Open

feat: test OTLP exporter TLS end to end#119
krishankumar01 wants to merge 5 commits into
masterfrom
kkumar-gcc/example-tls

Conversation

@krishankumar01

@krishankumar01 krishankumar01 commented Jun 8, 2026

Copy link
Copy Markdown
Member

📑 Description

Tests the OTLP exporter TLS config from goravel/framework#1475 end to end.

  • New otel-collector-tls compose service: OTLP over TLS on :4319, exporting to the same Jaeger/Prometheus/Loki backends as the existing collector.
  • TestTelemetryTLSTestSuite generates a CA and server certificate at setup, points the exporters at https://localhost:4319/v1/<signal> with insecure=false and tls.ca, and asserts traces, metrics, and logs arrive.
  • Regenerates config/telemetry.go with package:install Telemetry and pins the framework to current master, which also fixes the TestInstallAndUninstall* failures on master CI.

✅ Checks

  • Added test cases for my code

Add tls ca/cert/key knobs to the trace, metric, and log OTLP exporters,
mirroring the framework stub, so the example can target a TLS-enabled
collector (https:// endpoint with insecure=false).
Copilot AI review requested due to automatic review settings June 8, 2026 18:18
@krishankumar01 krishankumar01 requested a review from a team as a code owner June 8, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the example app’s telemetry configuration to allow OTLP trace/metric/log exporters to be configured for TLS by adding tls (ca/cert/key) file-path knobs in config/telemetry.go, aligning the example’s config surface with the framework’s expected options while keeping default plaintext behavior unchanged.

Changes:

  • Add tls map support to the OTLP trace exporter configuration (CA + optional mTLS client cert/key).
  • Add tls map support to the OTLP metric exporter configuration (CA + optional mTLS client cert/key).
  • Add tls map support to the OTLP log exporter configuration (CA + optional mTLS client cert/key).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config/telemetry.go Outdated
Comment on lines +198 to +199
// TLS certificate file paths. Set "ca" and use an https:// endpoint
// with insecure=false to reach a TLS-enabled collector.
Comment thread config/telemetry.go Outdated
Comment on lines +227 to +228
// TLS certificate file paths. Set "ca" and use an https:// endpoint
// with insecure=false to reach a TLS-enabled collector.
Comment thread config/telemetry.go Outdated
Comment on lines +251 to +252
// TLS certificate file paths. Set "ca" and use an https:// endpoint
// with insecure=false to reach a TLS-enabled collector.
@krishankumar01 krishankumar01 changed the title feat: expose OTLP exporter TLS config in telemetry feat: cover OTLP exporter TLS end to end and sync telemetry config with framework master Jun 9, 2026
Copilot AI review requested due to automatic review settings June 9, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Comment thread docker-compose.yml
Comment on lines +14 to +23
otel-collector-tls:
image: otel/opentelemetry-collector-contrib:latest
restart: always
command: ["--config=/etc/otel-config-tls.yaml"]
volumes:
- ./otel-config-tls.yaml:/etc/otel-config-tls.yaml
- ./tests/testdata/otel-tls:/etc/otel-tls:ro
ports:
- "4319:4319"

@krishankumar01 krishankumar01 changed the title feat: cover OTLP exporter TLS end to end and sync telemetry config with framework master feat: test OTLP exporter TLS end to end Jun 9, 2026
Copilot AI review requested due to automatic review settings June 10, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.

Comment on lines +46 to +47
s.False(facades.Process().Path("../../").Run("docker compose up -d prometheus jaeger loki otel-collector-tls").Failed())
time.Sleep(5 * time.Second)
Comment on lines +85 to +88
s.NoError(facades.App().Restart())

s.False(facades.Process().Path("../../").Run("docker compose down").Failed())
}
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.

2 participants