Skip to content

Conversation

@soneda-yuya
Copy link
Contributor

@soneda-yuya soneda-yuya commented Nov 21, 2025

Overview

  • change export from Google exporter to OTLP exporter
  • add env values to set params in details.
  • fix internal api errors which happens on visualizer internal api
    • if otel enable is false, application don't send request for otel
    • I will change internal api infrastructure after merging this PR to be enable otel on it.

What I've done

What I haven't done

How I tested

Which point I want you to review particularly

Memo

Checklist

  • Verified backward compatibility related to feature modifications (if not compatible, reported deployment notes to the next release owner).
  • Confirmed backward compatibility for migrations.
  • Verified that no personally identifiable information (PII) is included in any values that may be displayed.

@soneda-yuya soneda-yuya marked this pull request as ready for review November 25, 2025 05:20
@soneda-yuya soneda-yuya requested a review from pyshx as a code owner November 25, 2025 05:20
Copilot AI review requested due to automatic review settings November 25, 2025 05:20
@soneda-yuya soneda-yuya changed the title chore(server): refactore otel chore(server): improve the code related to otel Nov 25, 2025
Copilot finished reviewing on behalf of soneda-yuya November 25, 2025 05:23
Copy link
Contributor

Copilot AI left a comment

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 refactors the OpenTelemetry tracing implementation by replacing the Google Cloud Platform-specific trace exporter with a more flexible OTLP (OpenTelemetry Protocol) exporter. The changes introduce support for multiple exporter types (GCP, Jaeger, and OTLP) configurable via environment variables, providing better flexibility for different deployment environments.

Key changes:

  • Replaced GCP-specific trace exporter with OTLP exporter that supports multiple backends
  • Added comprehensive environment variable configuration for OpenTelemetry settings
  • Restructured tracing code into a dedicated otel package with improved separation of concerns

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
server/internal/app/otel/otel.go New package implementing OTLP-based tracer initialization with support for GCP, Jaeger, and generic OTLP exporters
server/internal/app/otel/middleware.go New middleware wrapper for Echo framework with path-based trace skipping
server/internal/app/config/config.go Added OpenTelemetry configuration fields for endpoint, exporter type, batching, and sampling
server/internal/app/main.go Updated tracer initialization to use new otel package with configuration from environment variables
server/internal/app/app.go Modified to conditionally apply OpenTelemetry middleware based on configuration
server/internal/app/server.go Added service name differentiation for main API vs internal API traces
server/internal/app/tracer.go Removed legacy GCP and Jaeger tracer initialization code
server/go.mod, server/go.sum Updated OpenTelemetry dependencies to v1.38.0 and added OTLP exporter packages

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

Copy link
Contributor

@wilfredmulenga wilfredmulenga left a comment

Choose a reason for hiding this comment

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

Looks good

@soneda-yuya soneda-yuya merged commit ae50c1d into main Nov 25, 2025
38 of 40 checks passed
@soneda-yuya soneda-yuya deleted the chore/refactor_otel branch November 25, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants