Skip to main content

Overview

Partner Zone analytics allow you to track traffic for each Partner Zone, providing insights into data consumption, like ingress and egress.

Prerequisites

  1. Console v1.39.0 (and above) and Gateway v3.12.0 (and above).
  2. Existing observability Interceptors must be deleted and re-created with global scope.

Enable Partner Zone traffic analytics

To enable Partner Zone traffic to be captured, the observability Interceptor with global scope has to be deployed on the same Gateway cluster where the Partner Zone is defined. Partner Zones on clusters without this Interceptor enabled will not capture traffic data.
If you already have an observability Interceptor deployed on the relevant Gateway cluster with a non-global scope (e.g., where the vcluster scope is set to passthrough), you’ll need to delete and re-create it with the global scope.Any previously collected data will remain intact - the observability Kafka topic will not be deleted during this process.
To enable traffic analytics in Console:
  1. Deploy the observability Interceptor on Gateway with a global scope in the metadata. Use the API or CLI:
Interceptors in the Console UI can only be created with a passthrough vcluster scope.When created, the Interceptors will not appear in the Console UI but will still function as expected.To verify the that the Interceptor has been created, make a Gateway API call GET /gateway/v2/interceptor.
  • Gateway API
  • Conduktor CLI
The host in this example is localhost:8888. Replace that with your Gateway’s host and port.
cURL command to the Gateway API
curl http://localhost:8888/gateway/v2/interceptor \
  -X PUT \
  -u admin:conduktor \
  -H 'content-type: application/json' \
  -d '{
    "kind" : "Interceptor",
    "apiVersion" : "gateway/v2",
    "metadata" : {
      "name" : "observability-interceptor",
      "scope":
        "vCluster": null,
        "group": null,
        "username": null
    },
    "spec" : {
      "pluginClass" : "io.conduktor.gateway.interceptor.observability.ObservabilityPlugin",
      "priority" : 100,
      "config" : {
        "topicName" : "_conduktor_observability",
        "replicationFactor" : 3,
        "flushIntervalInSecond" : 300
      }
    }
  }'
  1. Ensure that you create the Partner Zone on the the same Gateway cluster that this Interceptor was deployed to.
Once there’s Partner Zone activity (either by producing or consuming data from the aliased topics), you’ll see the metrics appear in the Traffic tab.

View Partner Zone traffic analytics

Once the observability Interceptor is deployed and collecting data, you can view analytics using the Console UI: go to Settings > Partner Zones. Click the Traffic tab in the Partner Zone list page to view the analytics:
  • Traffic views: choose the required view of data:
    • All: combined view of both ingress and egress traffic
    • Ingress: incoming traffic (data being produced to Partner Zone topics)
    • Egress: outgoing traffic (data being consumed from Partner Zone topics)
  • Date range: choose a date range to analyze a specific time period

Configure observability Interceptor

This Interceptor monitors produce and consume operations in order to collect metrics about incoming and outgoing traffic (bytes) in a topic. The collected metrics are then utilized by Console to display Partner Zone metrics.
The observability Interceptor has to be configured for global scope to properly track metrics across Partner Zones.
NameTypeDefaultDescription
topicNameStringTopics used to store observability metrics. If this topic already exists in your cluster, it has to have only one partition. If the topic doesn’t exist, Gateway will create it when you deploy the Interceptor.
replicationFactorIntThe replication factor to set if Gateway needs to create the topic.
flushIntervalInSecondInt300The periodic interval (in seconds) for Gateway to flush collected metrics to the specified topic.
After Gateway writes metrics to the observability topic, Console has to read and process these into the PostgreSQL database. This processing interval is defined by CDK_CHARGEBACK_FLUSH_METRICS_EVERY_SECONDS environment variable. The default is 300 (5 minutes). It defines how frequently Console reads metrics from the observability topic and writes them to the chargeback_metrics PostgreSQL table. You can configure it when deploying Console:
docker run -e CDK_CHARGEBACK_FLUSH_METRICS_EVERY_SECONDS=300 conduktor/conduktor-console:latest
Or in your docker-compose.yml:
services:
  console:
    image: conduktor/conduktor-console:latest
    environment:
      CDK_CHARGEBACK_FLUSH_METRICS_EVERY_SECONDS: 300
Data freshness: the total delay before metrics appear in Partner Zone analytics depends on these intervals (both default to 5 minutes):
  • Gateway: flush interval for the observability Interceptor (flushIntervalInSecond).
  • Console: processing interval (CDK_CHARGEBACK_FLUSH_METRICS_EVERY_SECONDS).
Reduce the values for more real-time data. Note that this will increase system overhead and storage.