Skip to content

Commit 27fa9e4

Browse files
authored
Merge pull request #9 from adobe-rnd/fix-config
fix: use Langfuse secrets instead of vars, set Adobe Langfuse URL
2 parents 87257a4 + 50069d0 commit 27fa9e4

5 files changed

Lines changed: 19 additions & 26 deletions

File tree

.dev.vars.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ AWS_REGION=us-west-2
22
AWS_BEARER_TOKEN_BEDROCK=...
33
LANGFUSE_PUBLIC_KEY=pk-lf-...
44
LANGFUSE_SECRET_KEY=sk-lf-...
5-
LANGFUSE_BASEURL=https://cloud.langfuse.com

env.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable */
2-
// Generated by Wrangler by running `wrangler types env.d.ts --include-runtime false` (hash: b707ecd5ae46ce87d3d42ea6aeb6bd02)
2+
// Generated by Wrangler by running `wrangler types env.d.ts --include-runtime false` (hash: 64d48df1142f6c16245ed443f0f2caff)
33
declare namespace Cloudflare {
44
interface GlobalProps {
55
mainModule: typeof import("./src/server");
@@ -10,10 +10,10 @@ declare namespace Cloudflare {
1010
VERSION: "@@VERSION@@-ci";
1111
RETURN_STACK_TRACES: "false";
1212
DA_ORIGIN: "https://admin.da.live";
13-
LANGFUSE_PUBLIC_KEY: "";
14-
LANGFUSE_SECRET_KEY: "";
15-
LANGFUSE_BASEURL: "";
13+
LANGFUSE_BASEURL: "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/";
1614
AWS_BEARER_TOKEN_BEDROCK: string;
15+
LANGFUSE_PUBLIC_KEY: string;
16+
LANGFUSE_SECRET_KEY: string;
1717
DAADMIN: Fetcher /* da-admin-stage */;
1818
DACOLLAB: Fetcher /* da-collab-stage */;
1919
}
@@ -23,10 +23,10 @@ declare namespace Cloudflare {
2323
VERSION: "@@VERSION@@";
2424
RETURN_STACK_TRACES: "false";
2525
DA_ORIGIN: "https://admin.da.live";
26-
LANGFUSE_PUBLIC_KEY: "";
27-
LANGFUSE_SECRET_KEY: "";
28-
LANGFUSE_BASEURL: "";
26+
LANGFUSE_BASEURL: "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/";
2927
AWS_BEARER_TOKEN_BEDROCK: string;
28+
LANGFUSE_PUBLIC_KEY: string;
29+
LANGFUSE_SECRET_KEY: string;
3030
DAADMIN: Fetcher /* da-admin */;
3131
DACOLLAB: Fetcher /* da-collab */;
3232
}
@@ -36,23 +36,23 @@ declare namespace Cloudflare {
3636
VERSION: "0.0.0-dev";
3737
RETURN_STACK_TRACES: "true";
3838
DA_ORIGIN: "http://localhost:8787";
39-
LANGFUSE_PUBLIC_KEY: "";
40-
LANGFUSE_SECRET_KEY: "";
41-
LANGFUSE_BASEURL: "";
39+
LANGFUSE_BASEURL: "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/";
4240
AWS_BEARER_TOKEN_BEDROCK: string;
41+
LANGFUSE_PUBLIC_KEY: string;
42+
LANGFUSE_SECRET_KEY: string;
4343
DAADMIN: Fetcher /* da-admin-local */;
4444
DACOLLAB: Fetcher /* da-collab-local */;
4545
}
4646
interface Env {
4747
AWS_BEARER_TOKEN_BEDROCK: string;
48+
LANGFUSE_PUBLIC_KEY: string;
49+
LANGFUSE_SECRET_KEY: string;
4850
AWS_REGION?: "us-west-2";
4951
ENVIRONMENT?: "ci" | "production" | "dev";
5052
VERSION?: "@@VERSION@@-ci" | "@@VERSION@@" | "0.0.0-dev";
5153
RETURN_STACK_TRACES?: "false" | "true";
5254
DA_ORIGIN?: "https://admin.da.live" | "http://localhost:8787";
53-
LANGFUSE_PUBLIC_KEY?: "";
54-
LANGFUSE_SECRET_KEY?: "";
55-
LANGFUSE_BASEURL?: "";
55+
LANGFUSE_BASEURL?: "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/";
5656
DAADMIN?: Fetcher /* da-admin-stage */ | Fetcher /* da-admin */ | Fetcher /* da-admin-local */;
5757
DACOLLAB?: Fetcher /* da-collab-stage */ | Fetcher /* da-collab */ | Fetcher /* da-collab-local */;
5858
}
@@ -62,5 +62,5 @@ type StringifyValues<EnvType extends Record<string, unknown>> = {
6262
[Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string;
6363
};
6464
declare namespace NodeJS {
65-
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "AWS_REGION" | "ENVIRONMENT" | "VERSION" | "RETURN_STACK_TRACES" | "DA_ORIGIN" | "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASEURL" | "AWS_BEARER_TOKEN_BEDROCK">> {}
65+
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "AWS_REGION" | "ENVIRONMENT" | "VERSION" | "RETURN_STACK_TRACES" | "DA_ORIGIN" | "LANGFUSE_BASEURL" | "AWS_BEARER_TOKEN_BEDROCK" | "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY">> {}
6666
}

src/telemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function initTelemetry(env: Env): void {
1717
exporter = new LangfuseExporter({
1818
publicKey: env.LANGFUSE_PUBLIC_KEY,
1919
secretKey: env.LANGFUSE_SECRET_KEY,
20-
baseUrl: env.LANGFUSE_BASEURL || 'https://cloud.langfuse.com',
20+
baseUrl: env.LANGFUSE_BASEURL || 'https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/',
2121
});
2222

2323
const provider = new BasicTracerProvider({

test/telemetry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('telemetry', () => {
5454
expect(mockLangfuseExporter).toHaveBeenCalledWith({
5555
publicKey: 'pk-test',
5656
secretKey: 'sk-test',
57-
baseUrl: 'https://cloud.langfuse.com',
57+
baseUrl: 'https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/',
5858
});
5959
expect(mockBasicTracerProvider).toHaveBeenCalledWith(
6060
expect.objectContaining({

wrangler.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENVIRONMENT = "ci"
2929
VERSION = "@@VERSION@@-ci"
3030
RETURN_STACK_TRACES = "false"
3131
DA_ORIGIN = "https://admin.da.live"
32-
LANGFUSE_PUBLIC_KEY = ""
33-
LANGFUSE_SECRET_KEY = ""
34-
LANGFUSE_BASEURL = ""
32+
LANGFUSE_BASEURL = "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/"
3533

3634
# ----------------------------------------------------------------------
3735
# production environment
@@ -49,9 +47,7 @@ ENVIRONMENT = "production"
4947
VERSION = "@@VERSION@@"
5048
RETURN_STACK_TRACES = "false"
5149
DA_ORIGIN = "https://admin.da.live"
52-
LANGFUSE_PUBLIC_KEY = ""
53-
LANGFUSE_SECRET_KEY = ""
54-
LANGFUSE_BASEURL = ""
50+
LANGFUSE_BASEURL = "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/"
5551

5652
# ----------------------------------------------------------------------
5753
# dev environment (local)
@@ -69,6 +65,4 @@ ENVIRONMENT = "dev"
6965
VERSION="0.0.0-dev"
7066
RETURN_STACK_TRACES = "true"
7167
DA_ORIGIN = "http://localhost:8787"
72-
LANGFUSE_PUBLIC_KEY = ""
73-
LANGFUSE_SECRET_KEY = ""
74-
LANGFUSE_BASEURL = ""
68+
LANGFUSE_BASEURL = "https://mystique-langfuse-prod.corp.ethos117-prod-va6.ethos.adobe.net/"

0 commit comments

Comments
 (0)