Skip to content

[DERCBOT-1374] Public URL for Langfuse Observability Settings #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

scezen
Copy link
Contributor

@scezen scezen commented Feb 26, 2025

Ticket : DERCBOT-1374

This PR introduces a new optionnal attribute for the Observability Settings :

data class LangfuseObservabilitySetting<T>(
    override val secretKey: T,
    val publicKey: String,
    val url: String,
    val publicUrl : String? = null,
) : ObservabilitySettingBase<T>(ObservabilityProvider.Langfuse), HasSecretKey<T>

If filled, the traceUrl of ObservabilityInfo will get replaced by the public URL as so :

"botMetadata": {
"lastAnswer": false,
"priority": "normal",
"visibility": "UNKNOWN",
"quoteMessage": "UNKNOWN",
"orchestrationLock": false,
"orchestratedBy": null,
"returnsHistory": false,
"debugEnabled": false,
"sourceWithContent": false,
"isGenAiRagAnswer": true,
"streamedResponse": false,
"observabilityInfo": {
"traceId": "6832661a-ed85-404d-abff-71a1f50bf410",
"traceName": "RAG",
"traceUrl": "http://langfuse-public:3000//trace/6832661a-ed85-404d-abff-71a1f50bf410"
}

@scezen scezen changed the title Feature/public langfuse url/dercbot 1374 [DERCBOT-1374] Public URL for Langfuse Observability Settings Feb 26, 2025
@scezen scezen force-pushed the feature/public-langfuse-url/DERCBOT-1374 branch from 2f1f3f2 to 0611d9e Compare February 27, 2025 08:57
@scezen scezen force-pushed the feature/public-langfuse-url/DERCBOT-1374 branch from 7d54ad9 to b94864d Compare March 4, 2025 15:33
@scezen scezen marked this pull request as ready for review March 6, 2025 13:45
Copy link
Contributor

@assouktim assouktim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your code, it just needs a few adjustments.

Copy link
Member

@Benvii Benvii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok but needs to remove it from python side as it's not used

@@ -42,6 +42,11 @@ class LangfuseObservabilitySetting(BaseObservabilitySetting):
url: AnyUrl = Field(
description='The Langfuse server url', examples=['https://cloud.langfuse.com'], default='http://localhost:3000'
)
public_url: Optional[AnyUrl] = Field(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have a public URL here as it's not used in the orchestrator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we share the same data model between the orchestrator and the bot admin BotObservabilityConfigurationDTO.setting is LangfuseObservabilitySetting which came from the Orchestrator API contract we should have a BotAdmin API contract decorrelated from the ochestrator contract to avoid this.

@Benvii Benvii force-pushed the feature/public-langfuse-url/DERCBOT-1374 branch from f73351e to e5a2f62 Compare March 27, 2025 10:32
@Benvii Benvii merged commit 266483c into theopenconversationkit:master Mar 27, 2025
@Benvii Benvii deleted the feature/public-langfuse-url/DERCBOT-1374 branch March 27, 2025 10:35
@vsct-jburet vsct-jburet added this to the 25.3.0 milestone Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants