Skip to content

(feat-351) add oltp headers#969

Open
hangweizhang wants to merge 1 commit intoagentscope-ai:mainfrom
hangweizhang:feat-351
Open

(feat-351) add oltp headers#969
hangweizhang wants to merge 1 commit intoagentscope-ai:mainfrom
hangweizhang:feat-351

Conversation

@hangweizhang
Copy link

feat(studio): add OTLP headers support for authentication

Add support for configuring OTLP headers in agentscope-extensions-studio
to enable authentication with external tracing systems like Langfuse.

Changes:

  • Add otlpHeaders field to StudioConfig with getter method
  • Add addOtlpHeader() and otlpHeaders() builder methods to StudioConfig
  • Add corresponding methods to StudioManager.Builder for convenience
  • Pass configured headers to TelemetryTracer during initialization
  • Add comprehensive test cases for header configuration

This closes #351 by allowing users to configure authentication headers
when reporting trace data via OTLP to systems requiring authentication.

Example usage for Langfuse:

StudioManager.init()
    .studioUrl("https://cloud.langfuse.com")
    .tracingUrl("https://cloud.langfuse.com/api/public/otel/v1/traces")
    .addOtlpHeader("Authorization", "Basic " + base64Credentials)
    .initialize()
    .block();

@hangweizhang hangweizhang requested a review from a team March 15, 2026 05:03
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../java/io/agentscope/core/studio/StudioManager.java 50.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hangweizhang
Copy link
Author

@LearningGp thx for review this pr for support oltp headers #351

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.

[Feature]: agentscope-extensions-studio Support otlp headers.

1 participant