* fix: patch security alerts — OTel, Tomcat, Jetty, Logback, Spring, SnakeYAML (#153) Resolves open Dependabot security alerts across critical+high severity tiers. Key change: opentelemetry-api/sdk/exporter-otlp 1.32.0 → 1.62.0 (CVE-2026-45292, published dep). Semconv 1.23.1-alpha → 1.41.1 (stable GA); migrates ResourceAttributes.SERVICE_* → ServiceAttributes.SERVICE_* (class removed in 1.30+). Other fixes (test/example scope, non-published): - Jetty 9.4.57 → 9.4.58.v20250814 (CVE-2025-5115 in http2-common) - Logback 1.2.13 → 1.5.32 (CVE-2025-11226, CVE-2024-12798, CVE-2024-12801, CVE-2026-1225; the 1.2.13 pin was overly conservative — CVE-2023-6481/6378 are fixed since 1.3.12) - Tomcat 9.0.115 → 9.0.118 in example module (14 alerts, 4 critical) - Spring 5.3.34 → 5.3.39 + spring-expression constraint (CVE-2024-38809, CVE-2024-38808) - SnakeYAML 1.31 → 1.32 (CVE-2022-38752, CVE-2022-41854) Adds SECURITY_FIX_PLAN.md tracking open/stale/no-fix-available alert status. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * release: 0.1.0-beta.6 --------- Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
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