otel

command
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2025 License: MIT Imports: 10 Imported by: 0

README

GoVisual OpenTelemetry Example

This example demonstrates GoVisual integration with OpenTelemetry.

Prerequisites

  • Docker and Docker Compose for running Jaeger

Setup

  1. Start Jaeger:
docker-compose up -d
  1. Run the example:
go run main.go

This will start a server on port 8080 with OpenTelemetry instrumentation enabled.

Endpoints

  • / - Home page with links to API endpoints
  • /api/users - Returns user data with nested spans
  • /api/search?q=test - Search endpoint with query parameter as a span attribute
  • /api/health - Health check endpoint (not traced due to ignore path)

Accessing the Dashboards

Features Demonstrated

  • GoVisual integration with OpenTelemetry
  • Creating custom spans and nested spans
  • Adding attributes to spans
  • Path-based span filtering
  • Viewing traces in Jaeger
  • Correlating requests between GoVisual and Jaeger

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL