Skip to content

Commit

Permalink
added hydrolix analytics (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtwist authored Feb 10, 2025
1 parent 888253b commit b4da0dd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/zuplo.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {
RuntimeExtensions,
ZuploRequest,
environment,
HydrolixRequestLoggerPlugin,
HydrolixDefaultEntry,
defaultGenerateHydrolixEntry,
} from "@zuplo/runtime";

export function runtimeInit(runtime: RuntimeExtensions) {
Expand All @@ -15,6 +18,18 @@ export function runtimeInit(runtime: RuntimeExtensions) {
);
}

runtime.addPlugin(
new HydrolixRequestLoggerPlugin<HydrolixDefaultEntry>({
hostname: environment.HYDROLIX_HOSTNAME,
username: environment.HYDROLIX_USERNAME,
password: environment.HYDROLIX_PASSWORD,
token: environment.HYDROLIX_TOKEN,
table: environment.HYDROLIX_TABLE,
transform: environment.HYDROLIX_TRANSFORM,
generateLogEntry: defaultGenerateHydrolixEntry
})
);

if (environment.USE_WILDCARD_SUBDOMAIN === "true") {
// This rewrites the URL of the request when the service is hosted
// with wildcard subdomains by taking the binId from the subdomain and
Expand Down

0 comments on commit b4da0dd

Please sign in to comment.