Skip to content

feat: test OTLP exporter TLS end to end - #119

Merged
krishankumar01 merged 12 commits into
masterfrom
kkumar-gcc/example-tls
Jun 13, 2026
Merged

feat: test OTLP exporter TLS end to end#119
krishankumar01 merged 12 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 (behind the tls compose profile), 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.
  • New tests/telemetry kit shared by both telemetry suites: compose lifecycle with readiness probes instead of sleeps, polling backend assertions (AwaitTraces/AwaitMetric/AwaitLogs), config override/restore scope, and teardown owned by TestMain. Each suite claims a unique telemetry.service.name. Conventions documented in AGENTS.md.

Manual telemetry usage examples (custom spans, metrics, propagation, per the v1.18 docs) will follow in a separate PR as a consumer of this kit.

✅ 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 thread config/telemetry.go Outdated
Comment thread config/telemetry.go Outdated
@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
@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 thread tests/feature/telemetry_tls_test.go Outdated
Comment thread tests/feature/telemetry_tls_test.go Outdated
Copilot AI review requested due to automatic review settings June 11, 2026 16:02

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 3 comments.

Comment thread tests/feature/telemetry_tls_test.go
Comment thread tests/feature/telemetry_tls_test.go Outdated
Comment thread tests/feature/telemetry_tls_test.go Outdated

@hwbrzzl hwbrzzl 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.

LGTM, please consider the Copilot comments.

@hwbrzzl

hwbrzzl commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Could you add some examples based on https://github.com/goravel/docs/pull/192/changes#diff-2869e2731d8a93f0fb13dc4cd219545d1b4cdf8d12c79d8ea7012690f2b3d6ff? It's good to show how to use the telemetry module. It's fine to add them in another PR or this one.

@krishankumar01

Copy link
Copy Markdown
Member Author

Could you add some examples based on https://github.com/goravel/docs/pull/192/changes#diff-2869e2731d8a93f0fb13dc4cd219545d1b4cdf8d12c79d8ea7012690f2b3d6ff? It's good to show how to use the telemetry module. It's fine to add them in another PR or this one.

Will raise a separate PR for this

Copilot AI review requested due to automatic review settings June 12, 2026 10:13

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 14 out of 16 changed files in this pull request and generated no new comments.

hwbrzzl
hwbrzzl previously approved these changes Jun 13, 2026

@hwbrzzl hwbrzzl 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.

LGTM

Copilot AI review requested due to automatic review settings June 13, 2026 02:21

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 13 out of 15 changed files in this pull request and generated 2 comments.

Comment thread tests/telemetry/stack.go Outdated
Comment thread tests/telemetry/query_test.go Outdated

@hwbrzzl hwbrzzl 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.

LGTM

@krishankumar01
krishankumar01 merged commit b20e6e4 into master Jun 13, 2026
4 checks passed
@krishankumar01
krishankumar01 deleted the kkumar-gcc/example-tls branch June 13, 2026 08:29
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.

3 participants