spring-projects / spring-projects/spring-boot

Auto-configure testing support for tracing

Open
#39,451 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work theme: observability type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

Currently there's no out of the box way to set up a test with tracing turned on that would collect spans in a queue for further analysis. What is required now from the user is to either use a TestSpanHandler from Brave or ArrayListSpanReporter from OTel.

With the changes in this PR we're introducing an abstract concept of aggregating spans for Micrometer Tracing API.

In Spring Boot we would need the @TracingTest test slice that would turn on the @AutoConfigureObservability with tracing on and would register the TestSpanHandler as a bean.

related issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed @TracingTest slice, @AutoConfigureObservability, and the related Micrometer Tracing PR and issue. Determine how the slice should enable tracing and register Brave's TestSpanHandler as a bean. Done means a test can use the slice and inspect collected spans without manually configuring a handler.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
observability, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.