Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
Change obsPlatform to connections in Ingester (#55)
Patcher99b9f549c714e2
diff --git a/README.md b/README.mdindex 9339e3e3..c33a2904 100644--- a/README.md+++ b/README.md@@ -64,7 +64,7 @@ helm install doku dokulabs/doku```**NOTE**:-> As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `observabilityPlatform` configuration within the [values.yaml](https://github.com/dokulabs/doku/tree/main/helm/doku/values.yaml) file in the Helm Chart. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.+> As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [values.yaml](https://github.com/dokulabs/doku/tree/main/helm/doku/values.yaml) file in the Helm Chart. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.For a detailed list of configurable parameters for the Helm chart, refer to the `values.yaml` file in the [Helm chart](https://github.com/dokulabs/doku/tree/main/helm/doku).diff --git a/assets/example-config.yml b/assets/example-config.ymlindex d438cbe5..4a3305b7 100644--- a/assets/example-config.yml+++ b/assets/example-config.yml@@ -21,7 +21,7 @@ dbConfig:# Configure Platform to export LLM Observability Data from Doku# Only one platform can be enabled at a time, To enable a platform, set enabled to true and fill in the required fields for that platform.-observabilityPlatform:+connections:enabled: false # Enable or Disable the Observability Platform, Example: true# grafanaCloud:# promUrl: "influx-line-proxy-url" # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.1/configuration.mdx b/docs/0.0.1/configuration.mdxindex cc1f7c53..0304842a 100644--- a/docs/0.0.1/configuration.mdx+++ b/docs/0.0.1/configuration.mdx@@ -20,8 +20,10 @@ ingesterPort: 9044</ResponseField>### Pricing Information Source+<ResponseField name="pricingInfo" type="Object">+ Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.+</ResponseField>-Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.<Info>We strongly recommend using the `url` method with the value set as `https://raw.githubusercontent.com/dokulabs/ingester/main/assets/pricing.json`.@@ -111,7 +113,7 @@ This ensures that you automatically retrieve the latest pricing information upon### Observability Platform Configuration-<ResponseField name="observabilityPlatform" type="Object">+<ResponseField name="connections" type="Object">Choose the external platform you wish to use for exporting observability data from Doku and set `enabled` to `true`. Fill in the required fields for the chosen platform. Only one platform can be selected at a time.The following sections show example configurations for different platforms - Grafana Cloud, New Relic, and DataDog. You will need to uncomment the applicable section and provide necessary credentials such as URLs, User IDs, and API Keys corresponding to your account on the observability platform.@@ -139,7 +141,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truegrafanaCloud:promUrl: "https://your-grafana-prometheus-url"@@ -164,7 +166,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truedatadog:metricsUrl: "https://api.datadoghq.com/api/v1/series"@@ -187,7 +189,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truenewRelic:metricsUrl: "https://metric-api.newrelic.com/metric/v1"@@ -227,7 +229,7 @@ dbConfig:# Configure Platform to export LLM Observability Data from Doku# Only one platform can be enabled at a time, To enable a platform, set enabled to true and fill in the required fields for that platform.-observabilityPlatform:+connections:enabled: false # Enable or Disable the Observability Platform, Example: true# grafanaCloud:# promUrl: "influx-line-proxy-url" # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.1/installation.mdx b/docs/0.0.1/installation.mdxindex 68b9c333..facbc7e9 100644--- a/docs/0.0.1/installation.mdx+++ b/docs/0.0.1/installation.mdx@@ -55,7 +55,7 @@ Deploy Doku on your Kubernetes cluster using the [Doku Helm chart](https://githu```</Step></Steps>-<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>+<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>## DockerQuickly spin up Doku using Docker for a fast and straightforward setup.@@ -105,12 +105,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -151,12 +151,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -246,12 +246,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.1/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>diff --git a/docs/0.0.1/integrations/datadog.mdx b/docs/0.0.1/integrations/datadog.mdxindex 92dffa4f..22306824 100644--- a/docs/0.0.1/integrations/datadog.mdx+++ b/docs/0.0.1/integrations/datadog.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to DataDog using the [SubmiAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truedatadog:metricsUrl: <your-datadog-metrics-url> # URL to the DataDog Metrics APIdiff --git a/docs/0.0.1/integrations/grafanacloud.mdx b/docs/0.0.1/integrations/grafanacloud.mdxindex 044bba27..e3e621a9 100644--- a/docs/0.0.1/integrations/grafanacloud.mdx+++ b/docs/0.0.1/integrations/grafanacloud.mdx@@ -13,7 +13,7 @@ Doku can automatically send LLM usage data from Doku to Grafana Cloud using theAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truegrafanaCloud:promUrl: <your-grafana-cloud-influx-line-proxy-url> # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.1/integrations/new-relic.mdx b/docs/0.0.1/integrations/new-relic.mdxindex 391c8b9c..c70ef4f7 100644--- a/docs/0.0.1/integrations/new-relic.mdx+++ b/docs/0.0.1/integrations/new-relic.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to New Relic using the [RepAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truenewRelic:metricsUrl: <your-new-relic-metrics-url> # URL to the New Relic Metric APIdiff --git a/docs/0.0.2/configure.mdx b/docs/0.0.2/configure.mdxindex cc1f7c53..0304842a 100644--- a/docs/0.0.2/configure.mdx+++ b/docs/0.0.2/configure.mdx@@ -20,8 +20,10 @@ ingesterPort: 9044</ResponseField>### Pricing Information Source+<ResponseField name="pricingInfo" type="Object">+ Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.+</ResponseField>-Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.<Info>We strongly recommend using the `url` method with the value set as `https://raw.githubusercontent.com/dokulabs/ingester/main/assets/pricing.json`.@@ -111,7 +113,7 @@ This ensures that you automatically retrieve the latest pricing information upon### Observability Platform Configuration-<ResponseField name="observabilityPlatform" type="Object">+<ResponseField name="connections" type="Object">Choose the external platform you wish to use for exporting observability data from Doku and set `enabled` to `true`. Fill in the required fields for the chosen platform. Only one platform can be selected at a time.The following sections show example configurations for different platforms - Grafana Cloud, New Relic, and DataDog. You will need to uncomment the applicable section and provide necessary credentials such as URLs, User IDs, and API Keys corresponding to your account on the observability platform.@@ -139,7 +141,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truegrafanaCloud:promUrl: "https://your-grafana-prometheus-url"@@ -164,7 +166,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truedatadog:metricsUrl: "https://api.datadoghq.com/api/v1/series"@@ -187,7 +189,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truenewRelic:metricsUrl: "https://metric-api.newrelic.com/metric/v1"@@ -227,7 +229,7 @@ dbConfig:# Configure Platform to export LLM Observability Data from Doku# Only one platform can be enabled at a time, To enable a platform, set enabled to true and fill in the required fields for that platform.-observabilityPlatform:+connections:enabled: false # Enable or Disable the Observability Platform, Example: true# grafanaCloud:# promUrl: "influx-line-proxy-url" # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.2/installation.mdx b/docs/0.0.2/installation.mdxindex ebf32cfe..8da673fa 100644--- a/docs/0.0.2/installation.mdx+++ b/docs/0.0.2/installation.mdx@@ -55,7 +55,7 @@ Deploy Doku on your Kubernetes cluster using the [Doku Helm chart](https://githu```</Step></Steps>-<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>+<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>## DockerQuickly spin up Doku using Docker for a fast and straightforward setup.@@ -105,12 +105,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -151,12 +151,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -246,12 +246,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.2/configure#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>diff --git a/docs/0.0.2/integrations/datadog.mdx b/docs/0.0.2/integrations/datadog.mdxindex 92dffa4f..22306824 100644--- a/docs/0.0.2/integrations/datadog.mdx+++ b/docs/0.0.2/integrations/datadog.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to DataDog using the [SubmiAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truedatadog:metricsUrl: <your-datadog-metrics-url> # URL to the DataDog Metrics APIdiff --git a/docs/0.0.2/integrations/grafanacloud.mdx b/docs/0.0.2/integrations/grafanacloud.mdxindex 044bba27..e3e621a9 100644--- a/docs/0.0.2/integrations/grafanacloud.mdx+++ b/docs/0.0.2/integrations/grafanacloud.mdx@@ -13,7 +13,7 @@ Doku can automatically send LLM usage data from Doku to Grafana Cloud using theAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truegrafanaCloud:promUrl: <your-grafana-cloud-influx-line-proxy-url> # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.2/integrations/new-relic.mdx b/docs/0.0.2/integrations/new-relic.mdxindex 391c8b9c..c70ef4f7 100644--- a/docs/0.0.2/integrations/new-relic.mdx+++ b/docs/0.0.2/integrations/new-relic.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to New Relic using the [RepAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truenewRelic:metricsUrl: <your-new-relic-metrics-url> # URL to the New Relic Metric APIdiff --git a/docs/0.0.3/configuration.mdx b/docs/0.0.3/configuration.mdxindex f518b38d..a21edab2 100644--- a/docs/0.0.3/configuration.mdx+++ b/docs/0.0.3/configuration.mdx@@ -30,7 +30,10 @@ retentionPeriod: "6 months"### Pricing Information Source-Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.+<ResponseField name="pricingInfo" type="Object">+ Doku supports using either a local file or a URL to retrieve LLM Pricing data. Comment out the option you do not wish to use.+</ResponseField>+<Info>We strongly recommend using the `url` method with the value set as `https://raw.githubusercontent.com/dokulabs/ingester/main/assets/pricing.json`.@@ -118,9 +121,9 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>-### Observability Platform Configuration+### Connections Configuration-<ResponseField name="observabilityPlatform" type="Object">+<ResponseField name="connections" type="Object">Choose the external platform you wish to use for exporting observability data from Doku and set `enabled` to `true`. Fill in the required fields for the chosen platform. Only one platform can be selected at a time.The following sections show example configurations for different platforms - Grafana Cloud, New Relic, and DataDog. You will need to uncomment the applicable section and provide necessary credentials such as URLs, User IDs, and API Keys corresponding to your account on the observability platform.@@ -148,7 +151,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truegrafanaCloud:promUrl: "https://your-grafana-prometheus-url"@@ -173,7 +176,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truedatadog:metricsUrl: "https://api.datadoghq.com/api/v1/series"@@ -196,7 +199,7 @@ This ensures that you automatically retrieve the latest pricing information upon</ResponseField>**Example**:```yaml- observabilityPlatform:+ connections:enabled: truenewRelic:metricsUrl: "https://metric-api.newrelic.com/metric/v1"@@ -238,7 +241,7 @@ dbConfig:# Configure Platform to export LLM Observability Data from Doku# Only one platform can be enabled at a time, To enable a platform, set enabled to true and fill in the required fields for that platform.-observabilityPlatform:+connections:enabled: false # Enable or Disable the Observability Platform, Example: true# grafanaCloud:# promUrl: "influx-line-proxy-url" # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.3/installation.mdx b/docs/0.0.3/installation.mdxindex 251604b9..b25acbc1 100644--- a/docs/0.0.3/installation.mdx+++ b/docs/0.0.3/installation.mdx@@ -55,7 +55,7 @@ Deploy Doku on your Kubernetes cluster using the [Doku Helm chart](https://githu```</Step></Steps>-<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>+<Info>As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [values.yaml](https://github.com/dokulabs/helm/blob/main/charts/doku/values.yaml) file. Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>## DockerQuickly spin up Doku using Docker for a fast and straightforward setup.@@ -105,12 +105,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -151,12 +151,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>@@ -246,12 +246,12 @@ Quickly spin up Doku using Docker for a fast and straightforward setup.dataTable: DATATABLE # Name of the table to store LLM Data, Example: "DOKU"apiKeyTable: APIKEYTABLE # Name of the table to store API Keys, Example: "APIKEYS"- observabilityPlatform:+ connections:enabled: false```Be sure to replace the placeholder values with your actual database details and desired settings.<Info>- As Doku does not have a built-in visualization UI yet, it is preferred that you set up the observabilityPlatform configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#observability-platform-configuration) file.+ As Doku does not have a built-in visualization UI yet, it is preferred that you set up the `connections` configuration within the [Doku Configuration file (`doku.yml`)](/0.0.3/configuration#connections-configuration) file.Doing so enables visualization of the LLM Observability data processed by Doku using an external observability platform.</Info>diff --git a/docs/0.0.3/integrations/datadog.mdx b/docs/0.0.3/integrations/datadog.mdxindex 92dffa4f..22306824 100644--- a/docs/0.0.3/integrations/datadog.mdx+++ b/docs/0.0.3/integrations/datadog.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to DataDog using the [SubmiAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truedatadog:metricsUrl: <your-datadog-metrics-url> # URL to the DataDog Metrics APIdiff --git a/docs/0.0.3/integrations/grafanacloud.mdx b/docs/0.0.3/integrations/grafanacloud.mdxindex 044bba27..e3e621a9 100644--- a/docs/0.0.3/integrations/grafanacloud.mdx+++ b/docs/0.0.3/integrations/grafanacloud.mdx@@ -13,7 +13,7 @@ Doku can automatically send LLM usage data from Doku to Grafana Cloud using theAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truegrafanaCloud:promUrl: <your-grafana-cloud-influx-line-proxy-url> # URL to the Influx Line Proxy URL of the Grafana Cloud Prometheus Instancediff --git a/docs/0.0.3/integrations/new-relic.mdx b/docs/0.0.3/integrations/new-relic.mdxindex 391c8b9c..c70ef4f7 100644--- a/docs/0.0.3/integrations/new-relic.mdx+++ b/docs/0.0.3/integrations/new-relic.mdx@@ -8,7 +8,7 @@ Doku can automatically send LLM usage data from Doku to New Relic using the [RepAdd the following to your doku configuration file(`doku.yml`).```yaml doku.yml-observabilityPlatform:+connections:enabled: true # Enable or Disable the Observability Platform, Example: truenewRelic:metricsUrl: <your-new-relic-metrics-url> # URL to the New Relic Metric APIdiff --git a/src/ingester/config/config.go b/src/ingester/config/config.goindex 10bfe8c5..57182707 100644--- a/src/ingester/config/config.go+++ b/src/ingester/config/config.go@@ -28,7 +28,7 @@ type Configuration struct {MaxOpenConns int `yaml:"maxOpenConns"`MaxIdleConns int `yaml:"maxIdleConns"`} `yaml:"dbConfig"`- ObservabilityPlatform struct {+ Connections struct {Enabled bool `yaml:"enabled"`GrafanaCloud struct {PromURL string `yaml:"promUrl"`@@ -47,7 +47,7 @@ type Configuration struct {LogsURL string `yaml:"logsUrl"`APIKey string `yaml:"apiKey"`} `yaml:"datadog"`- } `yaml:"observabilityPlatform"`+ } `yaml:"connections"`}func validateConfig(cfg *Configuration) error {@@ -86,16 +86,16 @@ func validateConfig(cfg *Configuration) error {log.Info().Msg("dbConfig.username is now set")}- if cfg.ObservabilityPlatform.Enabled {+ if cfg.Connections.Enabled {definedConfigs := 0- if cfg.ObservabilityPlatform.GrafanaCloud.PromURL != "" {+ if cfg.Connections.GrafanaCloud.PromURL != "" {definedConfigs++}- if cfg.ObservabilityPlatform.NewRelic.Key != "" {+ if cfg.Connections.NewRelic.Key != "" {definedConfigs++}- if cfg.ObservabilityPlatform.DataDog.APIKey != "" {+ if cfg.Connections.DataDog.APIKey != "" {definedConfigs++}diff --git a/src/ingester/obsPlatform/obsPlatform.go b/src/ingester/connections/connections.gosimilarity index 68%rename from src/ingester/obsPlatform/obsPlatform.gorename to src/ingester/connections/connections.goindex 1fc29feb..57d2e540 100644--- a/src/ingester/obsPlatform/obsPlatform.go+++ b/src/ingester/connections/connections.go@@ -1,4 +1,4 @@-package obsPlatform+package connectionsimport ("ingester/config"@@ -11,10 +11,10 @@ import ()var (- ObservabilityPlatform string // ObservabilityPlatform contains the information on the platform in use.- httpClient *http.Client // httpClient is the HTTP client used to send data to the Observability Platform.- platform, call_type string // platform is the platform used to send data to the Observability Platform.- endpointTypeMapping = map[string]string{+ Connections string // Connections contains the information on the platform in use.+ httpClient *http.Client // httpClient is the HTTP client used to send data to the Observability Platform.+ platform, call_type string // platform is the platform used to send data to the Observability Platform.+ endpointTypeMapping = map[string]string{"openai.chat.completions": "Chat","openai.completions": "Chat","cohere.generate": "Chat",@@ -65,20 +65,20 @@ func normalizeString(s string) string {func Init(cfg config.Configuration) error {httpClient = &http.Client{Timeout: 5 * time.Second}- if cfg.ObservabilityPlatform.GrafanaCloud.LokiURL != "" {- grafanaPromUrl = cfg.ObservabilityPlatform.GrafanaCloud.PromURL- grafanaPromUsername = cfg.ObservabilityPlatform.GrafanaCloud.PromUsername- grafanaLokiUrl = cfg.ObservabilityPlatform.GrafanaCloud.LokiURL- grafanaLokiUsername = cfg.ObservabilityPlatform.GrafanaCloud.LokiUsername- grafanaAccessToken = cfg.ObservabilityPlatform.GrafanaCloud.AccessToken- } else if cfg.ObservabilityPlatform.NewRelic.Key != "" {- newRelicLicenseKey = cfg.ObservabilityPlatform.NewRelic.Key- newRelicMetricsUrl = cfg.ObservabilityPlatform.NewRelic.MetricsURL- newRelicLogsUrl = cfg.ObservabilityPlatform.NewRelic.LogsURL- } else if cfg.ObservabilityPlatform.DataDog.APIKey != "" {- dataDogMetricsUrl = cfg.ObservabilityPlatform.DataDog.MetricsURL- dataDogLogsUrl = cfg.ObservabilityPlatform.DataDog.LogsURL- dataDogAPIKey = cfg.ObservabilityPlatform.DataDog.APIKey+ if cfg.Connections.GrafanaCloud.LokiURL != "" {+ grafanaPromUrl = cfg.Connections.GrafanaCloud.PromURL+ grafanaPromUsername = cfg.Connections.GrafanaCloud.PromUsername+ grafanaLokiUrl = cfg.Connections.GrafanaCloud.LokiURL+ grafanaLokiUsername = cfg.Connections.GrafanaCloud.LokiUsername+ grafanaAccessToken = cfg.Connections.GrafanaCloud.AccessToken+ } else if cfg.Connections.NewRelic.Key != "" {+ newRelicLicenseKey = cfg.Connections.NewRelic.Key+ newRelicMetricsUrl = cfg.Connections.NewRelic.MetricsURL+ newRelicLogsUrl = cfg.Connections.NewRelic.LogsURL+ } else if cfg.Connections.DataDog.APIKey != "" {+ dataDogMetricsUrl = cfg.Connections.DataDog.MetricsURL+ dataDogLogsUrl = cfg.Connections.DataDog.LogsURL+ dataDogAPIKey = cfg.Connections.DataDog.APIKey}return nil}diff --git a/src/ingester/obsPlatform/datadog.go b/src/ingester/connections/datadog.gosimilarity index 99%rename from src/ingester/obsPlatform/datadog.gorename to src/ingester/connections/datadog.goindex 95b6d726..1bcbd6c9 100644--- a/src/ingester/obsPlatform/datadog.go+++ b/src/ingester/connections/datadog.go@@ -1,4 +1,4 @@-package obsPlatform+package connectionsimport ("bytes"diff --git a/src/ingester/obsPlatform/grafana-cloud.go b/src/ingester/connections/grafana-cloud.gosimilarity index 99%rename from src/ingester/obsPlatform/grafana-cloud.gorename to src/ingester/connections/grafana-cloud.goindex 0073b026..1b387e9a 100644--- a/src/ingester/obsPlatform/grafana-cloud.go+++ b/src/ingester/connections/grafana-cloud.go@@ -1,13 +1,14 @@-package obsPlatform+package connectionsimport ("bytes""fmt"- "github.com/rs/zerolog/log""net/http""strconv""strings""time"++ "github.com/rs/zerolog/log")func configureGrafanaCloudData(data map[string]interface{}) {diff --git a/src/ingester/obsPlatform/newrelic.go b/src/ingester/connections/newrelic.gosimilarity index 99%rename from src/ingester/obsPlatform/newrelic.gorename to src/ingester/connections/newrelic.goindex 9c539e89..6eeebc37 100644--- a/src/ingester/obsPlatform/newrelic.go+++ b/src/ingester/connections/newrelic.go@@ -1,4 +1,4 @@-package obsPlatform+package connectionsimport ("bytes"diff --git a/src/ingester/db/db.go b/src/ingester/db/db.goindex 86b53317..af817b0a 100644--- a/src/ingester/db/db.go+++ b/src/ingester/db/db.go@@ -6,8 +6,8 @@ import ("encoding/hex""fmt""ingester/config"+ "ingester/connections""ingester/cost"- "ingester/obsPlatform""net/http""sync""time"@@ -266,7 +266,7 @@ func insertDataToDB(data map[string]interface{}) (string, int) {}}- go obsPlatform.SendToPlatform(data)+ go connections.SendToPlatform(data)// Define the SQL query for data insertionquery := fmt.Sprintf("INSERT INTO %s (time, llmReqId, environment, endpoint, sourceLanguage, applicationName, completionTokens, promptTokens, totalTokens, finishReason, requestDuration, usageCost, model, prompt, response, imageSize, revisedPrompt, image, audioVoice, finetuneJobStatus) VALUES (NOW(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)", doku_llm_data_table)diff --git a/src/ingester/main.go b/src/ingester/main.goindex fb7acbde..f9e24c67 100644--- a/src/ingester/main.go+++ b/src/ingester/main.go@@ -9,17 +9,16 @@ import ("syscall""time"+ "github.com/common-nighthawk/go-figure"+ "github.com/gorilla/mux"+ "github.com/rs/zerolog"+ "github.com/rs/zerolog/log""ingester/api""ingester/auth""ingester/config"+ "ingester/connections""ingester/cost""ingester/db"- "ingester/obsPlatform"-- "github.com/common-nighthawk/go-figure"- "github.com/gorilla/mux"- "github.com/rs/zerolog"- "github.com/rs/zerolog/log")func waitForShutdown(server *http.Server) {@@ -84,13 +83,13 @@ func main() {log.Info().Msg("Successfully initialized connection to the backend database")// Initialize observability platform if configured- if cfg.ObservabilityPlatform.Enabled == true {+ if cfg.Connections.Enabled == true {log.Info().Msg("Initializing for your Observability Platform")- err := obsPlatform.Init(*cfg)+ err := connections.Init(*cfg)if err != nil {log.Fatal().Msg("Exiting due to error in initializing for your Observability Platform")}- log.Info().Msgf("Setup complete for sending data to %s", obsPlatform.ObservabilityPlatform)+ log.Info().Msg("Setup complete for sending data to your Observability Platform")}// Cache eviction setup for the authentication process