Skip to content

Add GenAI observability Spring Boot example - #191

Merged
davsclaus merged 3 commits into
apache:mainfrom
atiaomar1978-hub:cursor/genai-observability-example-c587
Aug 31, 2026
Merged

Add GenAI observability Spring Boot example#191
davsclaus merged 3 commits into
apache:mainfrom
atiaomar1978-hub:cursor/genai-observability-example-c587

Conversation

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor

Summary

Adds genai-observability Spring Boot example for Camel 4.23+ GenAI observability with LangChain4j, Ollama, Prometheus, and VictoriaTraces.

Companion to the GenAI observability blog series (Blog 2). Replaces the misplaced example from apache/camel-examples#255.

Test plan

  • ollama pull llama3.2 && ollama serve
  • docker compose up -d in example directory
  • mvn spring-boot:run
  • Verify gen_ai metrics at /actuator/prometheus

AI-generated PR on behalf of atiaomar1978-hub

Spring Boot example for Camel 4.23+ GenAI observability with LangChain4j,
Ollama, Prometheus, and VictoriaTraces.

Co-authored-by: Cursor Agent <noreply@cursor.com>
…example

camel-ai-observability is not yet in camel-spring-boot-bom; pin version
via ${camel-version} so the example module compiles.

Co-authored-by: Cursor Agent <noreply@cursor.com>
@davsclaus

Copy link
Copy Markdown
Contributor

you likely need to add the new -ai-starer that we are adding via
apache/camel-spring-boot#1918

@davsclaus

Copy link
Copy Markdown
Contributor

@atiaomar1978-hub ^^^

Use the Spring Boot starter from camel-spring-boot#1918 for the global
GenAI observability toggle. Fix application.properties to use
camel.aiobservability.enabled instead of camel.ai.observability.enabled.
Document both starter and impl dependencies in README.

Co-authored-by: Cursor <cursoragent@cursor.com>
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Addressed @davsclaus's follow-up comment:

  • Added camel-ai-observability-starter (from CAMEL-24555: Add Spring Boot config for GenAI observability camel-spring-boot#1918, now merged) alongside the existing camel-ai-observability impl dependency
  • Fixed application.properties: camel.ai.observability.enabledcamel.aiobservability.enabled
  • Updated genai-observability/README.adoc to document both dependencies
  • Regenerated root README.adoc examples index entry

mvn compile -pl genai-observability passes.

AI-generated on behalf of atiaomar1978-hub

@davsclaus

Copy link
Copy Markdown
Contributor

[ERROR] The project org.apache.camel.springboot.example:camel-example-spring-boot-genai-observability:4.23.0-SNAPSHOT (/home/runner/work/camel-spring-boot-examples/camel-spring-boot-examples/genai-observability/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for org.apache.camel.springboot:camel-ai-observability-starter:jar is missing. @ line 74, column 21

@davsclaus
davsclaus merged commit 6948d1f into apache:main Aug 31, 2026
1 check failed
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.

3 participants