spring-projects / spring-projects/spring-ai

TracerPresentObservationConfiguration Injection failed

Open
#5,641 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
A clear and concise description of what the bug is about.

Image

TracerPresentObservationConfiguration Injection failed

Environment
Please provide as many details as possible: Spring AI version, Java version, which vector store you use if any, etc

  <java.version>25</java.version>
 <spring-boot>4.0.3</version>
  <spring-ai.version>2.0.0-M2 / 2.0.0-M3</spring-ai.version>

Steps to reproduce
Steps to reproduce the issue.

spring:
  ai:
    chat:
      observations:
        include-error-logging: true
        log-prompt: true
        log-completion: true

Not effective

   ChatClientAutoConfiguration.TracerPresentObservationConfiguration:
      Did not match:
         - @ConditionalOnBean (types: io.micrometer.tracing.Tracer; SearchStrategy: all) did not find any beans of type io.micrometer.tracing.Tracer (OnBeanCondition)
      Matched:
         - @ConditionalOnClass found required class 'io.micrometer.tracing.Tracer' (OnClassCondition)

   ChatObservationAutoConfiguration.TracerPresentObservationConfiguration:
      Did not match:
         - @ConditionalOnBean (types: io.micrometer.tracing.Tracer; SearchStrategy: all) did not find any beans of type io.micrometer.tracing.Tracer (OnBeanCondition)
      Matched:
         - @ConditionalOnClass found required class 'io.micrometer.tracing.Tracer' (OnClassCondition)

   ImageObservationAutoConfiguration.TracerPresentObservationConfiguration:
      Did not match:
         - @ConditionalOnBean (types: io.micrometer.tracing.Tracer; SearchStrategy: all) did not find any beans of type io.micrometer.tracing.Tracer (OnBeanCondition)
      Matched:
         - @ConditionalOnClass found required class 'io.micrometer.tracing.Tracer' (OnClassCondition)

   VectorStoreObservationAutoConfiguration.TracerPresentObservationConfiguration:
      Did not match:
         - @ConditionalOnBean (types: io.micrometer.tracing.Tracer; SearchStrategy: all) did not find any beans of type io.micrometer.tracing.Tracer (OnBeanCondition)
      Matched:
         - @ConditionalOnClass found required class 'io.micrometer.tracing.Tracer' (OnClassCondition)

The Tracer bean exists in my project.

When injecting TracerPresentObservationConfiguration, it needs to be added after BraveAutoConfiguration.

If you have the same problem, you can leave it to me. If not, please contact me and I'll check it again carefully. However, my program is very simple; it doesn't include any custom classes or configurations.

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 with ChatClientAutoConfiguration, ChatObservationAutoConfiguration, ImageObservationAutoConfiguration, and VectorStoreObservationAutoConfiguration, focusing on their TracerPresentObservationConfiguration conditions. Compare their ordering with BraveAutoConfiguration and reproduce the issue using the supplied Spring YAML settings. Done means the existing Tracer bean is detected and observation logging becomes effective.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.