Skip to content

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

Open
ArtDu wants to merge 1 commit intomasterfrom
opentelemetry_test_example
Open

test(tracing): add OpenTelemetry tracing example with Jaeger#65
ArtDu wants to merge 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 from 044f3d6 to 5cc33ff Compare April 1, 2026 13:18
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 5cc33ff to 8d7ac6b Compare April 1, 2026 13:25
@ArtDu ArtDu requested a review from bitgorbovsky April 2, 2026 07:12
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