Commit 08db6342 authored by Liz Fong-Jones's avatar Liz Fong-Jones
Browse files

Move 1st-edition OTel-in-Go example under 1e/chapter-07 and modernize

The Intro to Observability OpenTelemetry-in-Go workshop is the companion app
for the instrumentation chapter of the 1st edition. Relocate it under
1e/chapter-07-instrumentation-with-opentelemetry/ and update its dependencies
so it still builds in 2026:

- Bump go directive to 1.24 and OpenTelemetry-Go to v1.44.0 (+contrib v0.69.0,
  grpc v1.81.1), dropping the stale monolithic genproto pin.
- Replace removed otelhttp.WithRouteTag / WithPublicEndpoint with small local
  withRouteTag helper and WithPublicEndpointFn.
- io/ioutil -> io; fmt.Fprintf -> fmt.Fprint for static strings (go vet).
- Add .env.example (referenced by README) and modernize update-dependencies.sh.

Also add a .gitignore that excludes the book PDF.

Co-Authored-By: default avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 74397524
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+12 −0
Changes for .gitignore: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Never commit the book PDF
*.pdf
9798341608412 - final.pdf

# env / secrets
.env

# Node
node_modules/

# Go build artifacts
1e/chapter-07-instrumentation-with-opentelemetry/src/opentelemetry-workshop
+3 −0
Changes for 1e/chapter-07-instrumentation-with-opentelemetry/.env.example: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
export HONEYCOMB_API_KEY=replace-this-with-a-real-api-key # important and unique to you
export HONEYCOMB_DATASET=hello-observability # can be any name
export SERVICE_NAME=fib-microsvc # can be any name
+7 −0
Changes for 1e/chapter-07-instrumentation-with-opentelemetry/README.md: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Intro to Observability: OpenTelemetry in Go

> **First-edition example.** This is the companion app for the OpenTelemetry
> instrumentation chapter of the **first edition** of _Observability Engineering_.
> Its dependencies have been updated so it still builds and runs with modern Go
> and OpenTelemetry (Go 1.24+, OpenTelemetry-Go v1.44+); the now-removed
> `otelhttp.WithRouteTag`/`WithPublicEndpoint` helpers are replaced with small
> local equivalents. For the second-edition examples, see [`../../2e/`](../../2e/).

This application is here for you to try out tracing.
It consists of a microservice that calls itself, so you can simulate
a whole microservice ecosystem with just one service!
+0 −0

File moved.

Loading