feat: add headers to TelemetryTracer to support capabilities such as authentication, for example, reporting trace data to Langfuse.#543
Merged
AlbumenJ merged 10 commits intoagentscope-ai:mainfrom Jan 14, 2026
Conversation
- Add HTTP headers support to TelemetryTracer.Builder for authentication - Create LangfuseExample demonstrating trace data reporting to Langfuse - Support Basic Auth for Langfuse OTLP endpoint configuration This enables agentscope-java to send trace data (agent calls, LLM calls, tool executions) to Langfuse for observability and multi-turn conversation evaluation. Change-Id: I0a9e16c47e5ba968d4fa3ee9c1bca94b86b07f06 Co-developed-by: Cursor <noreply@cursor.com>
- Add getLangfuseEndpoint() method for consistent configuration - Update initLangfuseTracing() to accept endpoint parameter - Update documentation with LANGFUSE_ENDPOINT env var - Default to US region if not specified Change-Id: Ie380386308e720c4e4ab1d80c39a4ec868aae36e Co-developed-by: Cursor <noreply@cursor.com>
- Add MsgRole and TextBlock imports - Replace Msg.userMsg() with proper builder pattern Change-Id: I5c45863b897d29f4e4a765a837b7b4be315e3065 Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: I69919218007d0c7c6bf07b807166ae0a74802cd2
Change-Id: Idf7c7758e4419227d27a6e85ffb71138eaec0bcc Co-developed-by: Cursor <noreply@cursor.com>
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
AlbumenJ
requested changes
Jan 14, 2026
...pe-extensions-studio/src/main/java/io/agentscope/core/tracing/telemetry/TelemetryTracer.java
Outdated
Show resolved
Hide resolved
...pe-extensions-studio/src/main/java/io/agentscope/core/tracing/telemetry/TelemetryTracer.java
Outdated
Show resolved
Hide resolved
…va/io/agentscope/core/tracing/telemetry/TelemetryTracer.java Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
…va/io/agentscope/core/tracing/telemetry/TelemetryTracer.java Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
- Add TelemetryTracerTest with tests for addHeader() and headers() methods - Cover various scenarios: single header, multiple headers, empty headers - Fix import statements in TelemetryTracer.java Change-Id: Ib1b799297ae82aff4831e848be07819f61690a27 Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: Ia860cb697d30154e08175178b8e81c6f627776ce Co-developed-by: Cursor <noreply@cursor.com>
AlbumenJ
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
1.0.7-SNAPSHOT
Description
Modify the destination storage for reporting trace data, for example Langfuse.
Add headers to TelemetryTracer to support capabilities such as authentication, for example, reporting trace data to Langfuse.
Modify TelemetryTracer.java , add headers (HashMap) objects and related get and set methods.
@Cirilla-zmh
Add a example project: LangfuseExample.java