## Summary Patch the remaining open Java/Maven Dependabot alerts on the Stainless next branch. ## Changes - Upgrade Jackson modules from 2.22.0 to 2.22.1. - Pin vulnerable test dependencies to patched versions: - Bouncy Castle modules: 1.84 - Log4j Core: 2.25.4 - Plexus Utils: 4.0.3 - Commons Lang: 3.18.0 - Use explicit versions for the test dependencies so the dependency graph recognizes the fixes. ## Security Alerts Resolves the affected alerts for Jackson Databind/Core, Bouncy Castle, Log4j Core, Plexus Utils, and Commons Lang, including: - GHSA-5jmj-h7xm-6q6v - GHSA-5hh8-q8hv-fr38 - GHSA-9fxm-vc8v-hj55 - GHSA-hgj6-7826-r7m5 - GHSA-rmj7-2vxq-3g9f - GHSA-j3rv-43j4-c7qm - GHSA-rcqc-6cw3-h962 - GHSA-cj8j-37rh-8475 - GHSA-c3fc-8qff-9hwx - GHSA-wg6q-6289-32hp - GHSA-445c-vh5m-36rj - GHSA-6hg6-v5c8-fphq - GHSA-3pxv-7cmr-fjr4 - GHSA-vc5p-v9hr-52mj - GHSA-6fmv-xxpf-w3cw - GHSA-72hv-8253-57qq ## Verification - Core test suite passed. - Kotlin formatting passed. - Gradle dependency resolution confirms Jackson Databind 2.22.1. - Diff check passed.
LangSmith Examples
This module contains runnable Kotlin examples organized by feature:
example/- SDK examples (ListRuns, Dataset, PromptManagement, RecordExperiment, E2eEval)example/otel/- OpenTelemetry tracing examples
Prerequisites
All examples require:
./gradlew :langsmith-java-example:run -Pexample=ExampleName -Dlangchain.langsmithApiKey=your_api_key
Alternatively, you can use environment variables:
export LANGSMITH_API_KEY=your_api_key
The langchain.baseUrl system property (or LANGSMITH_ENDPOINT environment variable) is optional and defaults to https://api.smith.langchain.com/ if not set.
OpenTelemetry Tracing Examples
Located in src/main/kotlin/com/langchain/smith/example/otel/
OpenAI + LangSmith (Real API Calls)
Make actual OpenAI API calls with automatic tracing to LangSmith.
./gradlew :langsmith-java-example:run -Pexample=OtelOpenAI \
-Dlangchain.langsmithApiKey=your_api_key \
-DOPENAI_API_KEY=your_openai_key \
-DLANGSMITH_PROJECT=my-project # optional, defaults to "default"
View traces at https://smith.langchain.com
LangSmith (Standalone)
Send mock traces to LangSmith without external API calls.
./gradlew :langsmith-java-example:run -Pexample=OtelLangSmith \
-Dlangchain.langsmithApiKey=your_api_key \
-DLANGSMITH_PROJECT=my-project # optional, defaults to "default"
View traces at https://smith.langchain.com
Spring Boot API to LangSmith
REST API with OpenTelemetry traces sent to LangSmith.
# Start server
./gradlew :langsmith-java-example:run -Pexample=SpringBootLangSmith \
-Dlangchain.langsmithApiKey=your_api_key \
-DLANGSMITH_PROJECT=my-project # optional
# In another terminal, test endpoints:
curl -X POST http://localhost:8080/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "Hello!"}'
curl "http://localhost:8080/api/analyze?text=This%20is%20great"
Prompt Management Example
Located in src/main/kotlin/com/langchain/smith/example/
Prompt Management (Getting Started)
RECOMMENDED - Clean, simple example following the same pattern as the Dataset example.
./gradlew :langsmith-java-example:run -Pexample=PromptManagement \
-Dlangchain.langsmithApiKey=your_api_key
Features demonstrated:
- Create prompt repositories using
client.repos().create() - Add prompt content with variables using
client.commits().update() - List and filter prompts using
client.repos().list() - Retrieve prompt content using
client.commits().retrieve() - View prompts in the LangSmith UI
This example follows the LangSmith Prompt Management docs and uses the SDK directly.
**Additional features:**
- Use prompts with OpenAI to generate responses
- Update prompt metadata and descriptions
- Pull specific commit versions
- System + user message prompts