Skip to content

OpenTelemetry Instrumentation Dashboard #1

Description

@ollygarden-rose

OpenTelemetry Instrumentation Dashboard

Do not edit this issue manually. Only checkbox interactions are supported.

Last review: 2026-07-01T00:39:43Z | Next scheduled review: 2026-07-08T00:39:43Z

  • Trigger review

Instrumentation Summary

No OpenTelemetry instrumentation detected in this codebase. The repository is a minimal single-file Go HTTP server with no third-party dependencies — go.sum is empty and go.mod declares only the module name. No OTel SDK packages, auto-instrumentation libraries, exporters, or manual span/metric call sites exist anywhere in the source, Dockerfile, Kubernetes manifests, or CI workflow. No alternative observability framework is used either.


Action Queue

Critical (0)

No findings

High (1)

  • HTTP server handler has no tracing, metrics, or observability — total operational blindness
    main.go:9

    Why and how to fix

    The application's only runtime boundary — the HTTP server on :8081 with the / handler (HelloServer) — produces no spans, metrics, or structured logs. go.mod declares zero dependencies (no OTel SDK, no logging library), and k8s/deployment.yaml carries no auto-instrumentation injection annotations (instrumentation.opentelemetry.io/inject-go) or OTEL_* environment variables. This means request latency, error rates, and throughput are invisible; when an upstream caller's trace reaches this service, there is no server span to link to, breaking distributed trace continuity.

    Fix:

    Option A — code instrumentation (recommended):

    Add go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp and initialize the OTel SDK with an OTLP exporter in main.go. Wrap the handler so every inbound request produces a server span with HTTP semantic convention attributes:

    import (
      "context"
      "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
      "go.opentelemetry.io/otel"
      sdktrace "go.opentelemetry.io/otel/sdk/trace"
      "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
      "go.opentelemetry.io/otel/sdk/resource"
      semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
    )
    
    func main() {
      ctx := context.Background()
      exp, _ := otlptracegrpc.New(ctx)
      tp := sdktrace.NewTracerProvider(
        sdktrace.WithBatcher(exp),
        sdktrace.WithResource(resource.NewWithAttributes(
          semconv.SchemaURL,
          semconv.ServiceName("hello-world"),
        )),
      )
      defer tp.Shutdown(ctx)
      otel.SetTracerProvider(tp)
    
      handler := otelhttp.NewHandler(http.HandlerFunc(HelloServer), "GET /")
      http.Handle("/", handler)
      http.ListenAndServe(":8081", nil)
    }

    Option B — zero-code instrumentation:

    Add the annotation instrumentation.opentelemetry.io/inject-go: "true" to the pod template in k8s/deployment.yaml and deploy an OpenTelemetry Operator Instrumentation CR. See Go zero-code instrumentation docs for details.

Medium (0)

No findings

Suggestion (0)

No findings


Generated by OllyGarden Rose 🌹

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions