Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/nodes/analytic/JLINC/JLINC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class JLINC_Analytic implements INode {
this.name = 'jlinc'
this.version = 1.0
this.type = 'JLINC'
this.icon = 'jlinc.png'
this.icon = 'jlinc.svg'
this.category = 'Analytic'
this.baseClasses = [this.type]
this.inputs = []
Expand Down
Empty file.
1 change: 1 addition & 0 deletions packages/components/nodes/analytic/JLINC/jlinc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 22 additions & 7 deletions packages/components/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { LunaryHandler } from '@langchain/community/callbacks/handlers/lunary'
import { getCredentialData, getCredentialParam, getEnvironmentVariable } from './utils'
import { ICommonObject, IDatabaseEntity, INodeData, IServerSideEventStreamer } from './Interface'
import { LangWatch, LangWatchSpan, LangWatchTrace, autoconvertTypedValues } from 'langwatch'
import { CredentialInfo, extractCredentialsAndModels } from './flowCredentialExtractor'
import { extractCredentialsAndModels } from './flowCredentialExtractor'
export interface TraceMetadata {
stripeCustomerId: string
subscriptionTier?: string
Expand Down Expand Up @@ -75,6 +75,19 @@ function applyEnvAnalyticsOverrides(analyticConfig?: string | object): any {
}
}

// JLINC env override - takes precedence over UI configuration
if (process.env.JLINC_DATA_STORE_API_KEY) {
analytic.jlinc = {
status: true,
dataStoreApiUrl: process.env.JLINC_DATA_STORE_API_URL,
dataStoreApiKey: process.env.JLINC_DATA_STORE_API_KEY,
archiveApiUrl: process.env.JLINC_ARCHIVE_API_URL,
archiveApiKey: process.env.JLINC_ARCHIVE_API_KEY,
agreementId: process.env.JLINC_AGREEMENT_ID ?? '00000000-0000-0000-0000-000000000000',
systemPrefix: process.env.JLINC_SYSTEM_PREFIX
}
}

// Future providers can be added here:
// if (process.env.LANGSMITH_API_KEY) { analytic.langSmith = { ... } }
// if (process.env.ARIZE_API_KEY) { analytic.arize = { ... } }
Expand Down Expand Up @@ -794,15 +807,17 @@ export const additionalCallbacks = async (nodeData: INodeData, options: ICommonO
const tracer: Tracer | undefined = getOpikTracer(opikOptions)
callbacks.push(tracer)
} else if (provider === 'jlinc') {
const dataStoreApiUrl = getCredentialParam('dataStoreApiUrl', credentialData, nodeData)
const dataStoreApiKey = getCredentialParam('dataStoreApiKey', credentialData, nodeData)
const archiveApiUrl = getCredentialParam('archiveApiUrl', credentialData, nodeData)
const archiveApiKey = getCredentialParam('archiveApiKey', credentialData, nodeData)
let agreementId = analytic[provider].agreementId as string
const dataStoreApiUrl =
analytic[provider]?.dataStoreApiUrl ?? getCredentialParam('dataStoreApiUrl', credentialData, nodeData)
const dataStoreApiKey =
analytic[provider]?.dataStoreApiKey ?? getCredentialParam('dataStoreApiKey', credentialData, nodeData)
const archiveApiUrl = analytic[provider]?.archiveApiUrl ?? getCredentialParam('archiveApiUrl', credentialData, nodeData)
const archiveApiKey = analytic[provider]?.archiveApiKey ?? getCredentialParam('archiveApiKey', credentialData, nodeData)
let agreementId = analytic[provider]?.agreementId as string
if (!agreementId || agreementId === '') {
agreementId = '00000000-0000-0000-0000-000000000000'
}
const systemPrefix = analytic[provider].systemPrefix as string
const systemPrefix = analytic[provider]?.systemPrefix as string
const tracer = new JLINCTracer({
dataStoreApiUrl,
dataStoreApiKey,
Expand Down
Loading
Loading