Skip to content

test(tracing): add OpenTelemetry tracing example with Jaeger#65

Merged
ArtDu merged 1 commit intomasterfrom
opentelemetry_test_example
Apr 9, 2026
Merged

test(tracing): add OpenTelemetry tracing example with Jaeger#65
ArtDu merged 1 commit intomasterfrom
opentelemetry_test_example

Conversation

@ArtDu
Copy link
Copy Markdown
Contributor

@ArtDu ArtDu commented Apr 1, 2026

Summary

Add test example demonstrating distributed tracing using OpenTelemetry API with Handlers.

Changes

  • Add testOpenTelemetryTracingWithJaeger() test method
  • Create spans for request lifecycle tracking:
    • tarantool.{TYPE}:{syncId} - main request span
    • tarantool.{TYPE}.timeout:{syncId} - timeout tracking span
  • Parse request/response data using Jackson mapping
  • Export traces to Jaeger via TestContainer
  • Show proper flamegraph with timeout and late response handling

Test Features

  • onBeforeSend: Creates spans with request type, function name, arguments
  • onSuccess: Ends spans with OK status and response data
  • onTimeout: Records timeout error in dedicated span
  • onIgnoredResponse: Handles late responses after timeout

Usage

The test is @Disabled by default. To run:

  1. Enable the test by removing @Disabled
  2. Run test - Jaeger starts via TestContainer
  3. Open printed URL (http://localhost:16686) in browser
  4. View traces with flamegraph

Example Output

tarantool.CALL:7
├── tarantool.CALL.timeout:7 [ERROR]
└── (late response handling)

🤖 Generated with Claude Code

@ArtDu ArtDu force-pushed the opentelemetry_test_example branch 2 times, most recently from 5cc33ff to 8d7ac6b Compare April 1, 2026 13:25
@ArtDu ArtDu requested a review from bitgorbovsky April 2, 2026 07:12
Add testOpenTelemetryTracingWithJaeger() demonstrating distributed
tracing using OpenTelemetry API with Handlers:

- Create spans for request lifecycle (onBeforeSend, onSuccess, onTimeout)
- Parse request/response data using Jackson mapping
- Export traces to Jaeger via TestContainer
- Show flamegraph with timeout and late response handling

The test is @disabled by default as it requires Docker and
keeps Jaeger running for manual inspection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ArtDu ArtDu force-pushed the opentelemetry_test_example branch from 8d7ac6b to 7de942d Compare April 9, 2026 11:36
@ArtDu ArtDu merged commit 94f49a0 into master Apr 9, 2026
10 of 11 checks passed
@ArtDu ArtDu deleted the opentelemetry_test_example branch April 9, 2026 13:09
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.

1 participant