Skip to content

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
YangzeXie:feat/langfuse-integration
Jan 14, 2026
Merged

feat: add headers to TelemetryTracer to support capabilities such as authentication, for example, reporting trace data to Langfuse.#543
AlbumenJ merged 10 commits intoagentscope-ai:mainfrom
YangzeXie:feat/langfuse-integration

Conversation

@YangzeXie
Copy link
Contributor

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

- 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>
@YangzeXie YangzeXie requested a review from a team January 13, 2026 09:52
@cla-assistant
Copy link

cla-assistant bot commented Jan 13, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Jan 13, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

YangzeXie and others added 5 commits January 14, 2026 10:06
…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 AlbumenJ changed the title Add headers to TelemetryTracer to support capabilities such as authentication, for example, reporting trace data to Langfuse. feat: add headers to TelemetryTracer to support capabilities such as authentication, for example, reporting trace data to Langfuse. Jan 14, 2026
@AlbumenJ AlbumenJ merged commit ff92c11 into agentscope-ai:main Jan 14, 2026
4 checks passed
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.

2 participants