On this page
What you get
Graphwake learns which services call which of your endpoints through Envoy or Istio, and how often. When a team confirms a caller, every endpoint that caller uses becomes a subscription of that team.
Optional. Without it, Graphwake still needs only your spec.
Before you start
- For Envoy, a header or a client certificate that identifies the caller. For Istio, mutual TLS between your workloads, because the caller is the calling workload.
- A Graphwake workspace on Pro or Enterprise, and an Admin to add the usage source.
- The Graphwake agent, which is open source: a binary from its releases on the machine where you try the steps below, or Docker to run its image
ghcr.io/graphwake/agent:0.5.0. - For Envoy, a machine that can read its log file and can run Docker, such as a self-hosted runner or agent on the Envoy host. For Istio, a machine with Docker where
kubectlcan read the sidecar logs.
Step 1: add a usage source
- In Graphwake, open Settings → Integrations → Usage sources and choose Add a source.
- Copy the usage key. It is shown once. Store it as a secret named
GRAPHWAKE_USAGE_KEYin the pipeline that will run the step.
Step 2: export the calls
graphwake usage query --source envoy prints an access log for the HTTP connection manager of the listener that receives the calls. It writes one JSON object per request: the time, the method, the host, the path and the caller:
# Envoy: add this access log to the HTTP connection manager of the listener that
# receives the calls, then send the file. One JSON object per line.
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: /var/log/envoy/usage.log
log_format:
json_format:
time: "%START_TIME%"
method: "%REQ(:METHOD)%"
host: "%REQ(:AUTHORITY)%"
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
caller: "%REQ(X-CLIENT-ID)%"
# "caller" names the calling service: a header you set at the edge, as above, or
# %DOWNSTREAM_PEER_SUBJECT% for mutual TLS (its common name is sent; a subject with a
# UID, DC, emailAddress or E part is withheld whole). The path is the one the caller
# sent, before any rewrite; its query string is dropped before matching.
# Istio sidecars: graphwake usage query --source envoy --mesh istiographwake usage query --source envoy prints.Set caller to the value that identifies the calling service. The example uses the request header X-Client-Id; for mutual TLS use %DOWNSTREAM_PEER_SUBJECT%, the subject of the client certificate, of which only the common name is sent. A subject with a UID, DC, emailAddress or E part is withheld whole. The path is the one the caller sent, before a route rewrites it. There is no separate export: the file is the export.
Istio
Istio's default access log has no caller in it. graphwake usage query --source envoy --mesh istio prints a log provider for the mesh configuration and a Telemetry resource that turns it on for the server side only, so a call is logged once:
# Istio: log the inbound (server) side of each sidecar as JSON with the fields Graphwake
# reads, then export the sidecar logs and send the file. Istio's default JSON access log
# has no peer identity, so add this provider (meshConfig in IstioOperator or Helm
# values; the mesh key of the istio ConfigMap) ...
meshConfig:
extensionProviders:
- name: graphwake-usage
envoyFileAccessLog:
path: /dev/stdout
logFormat:
labels:
start_time: "%START_TIME%"
method: "%REQ(:METHOD)%"
authority: "%REQ(:AUTHORITY)%"
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
upstream_cluster: "%UPSTREAM_CLUSTER_RAW%"
downstream_peer_uri_san: "%DOWNSTREAM_PEER_URI_SAN%"
# Do not set omitEmptyValues: a line without downstream_peer_uri_san is not read.
# ... and turn it on for the server side only, so that a call is logged once (or add this
# accessLogging entry to your existing mesh-wide Telemetry resource):
---
apiVersion: telemetry.istio.io/v1
kind: Telemetry
metadata:
name: graphwake-usage
namespace: istio-system
spec:
accessLogging:
- providers:
- name: graphwake-usage
match:
mode: SERVER
# The caller is the calling workload's SPIFFE id from mutual TLS:
# spiffe://cluster.local/ns/shop/sa/checkout is sent as shop/checkout (the trust domain
# is not sent). Without mutual TLS a request has no caller name.
# A line whose upstream_cluster is outbound (outbound|..., PassthroughCluster,
# BlackHoleCluster) is left out and counted, so a client-side log never counts twice.
# Export the sidecar logs of the last 7 days, for example:
# kubectl logs -n <namespace> -l app=<app> -c istio-proxy --since=168h --tail=-1 > istio-usage.jsonl
# (--tail=-1: with -l kubectl keeps only 10 lines per pod otherwise; for more than 5
# pods add --max-log-requests=<number of pods>.)
# Lines that are not access log lines are skipped and counted.graphwake usage query --source envoy --mesh istio prints.The caller is the calling workload's SPIFFE id from mutual TLS, sent as its namespace and service account: the checkout service account in the shop namespace is sent as shop/checkout, and the trust domain is not sent. Without mutual TLS a request has no caller name. Do not set omitEmptyValues on the provider: a line without downstream_peer_uri_san is not read.
The sidecars write the log to their standard output. Export the last 7 days of an app's sidecar logs with kubectl:
kubectl logs -n <namespace> -l app=<app> -c istio-proxy --since=168h --tail=-1 > istio-usage.jsonlWithout --tail=-1, kubectl keeps only 10 lines per pod when it selects pods with -l. For more than 5 pods, add --max-log-requests=<number of pods>.
Step 3: read what would be sent
Run the step with --dry-run. It uses the usage key to ask Graphwake for your endpoint list, prints the summary it would send and what is not sent, and sends no summary. In CI its output is the job log.
export GRAPHWAKE_USAGE_KEY=<your usage key>
graphwake usage --source envoy --input /var/log/envoy/usage.log --dry-runWith the Docker image instead, give it the file on standard input: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.5.0 usage --source envoy --dry-run < /var/log/envoy/usage.log.
--- would send ---
{"preset":"apim","agentVersion":"0.5.0","windowStart":"2026-11-12","windowEnd":"2026-11-18",
"countsIncluded":true,"unmatchedRequests":412,"withheldRequests":3,"anonymousRequests":7,
"rows":[{"caller":"checkout-web","callerKind":"client","endpointId":"9d2c...",
"service":"orders-api","method":"GET","path":"/orders/{}","count":14200,"lastSeen":"2026-11-18"}]}
--- end ---
Not sent to Graphwake:
Requests that matched no endpoint, by host and path prefix:
- gateway.internal /internal/health 412
Requests withheld because the caller name looked personal: 3
Requests without a caller name: 7Requests that matched none of your endpoints are listed by host and path prefix, at most 20 rows: the prefix is the first two segments of the path, and a segment that contains a digit, @ or %, or is longer than 24 characters, is printed as *. In a real run only their number is sent. If they are calls to your services through a gateway, add a mapping rule on the usage source and run the dry run again.
For Istio, add --mesh istio after --source envoy, and read the exported file:
graphwake usage --source envoy --mesh istio --input istio-usage.jsonl --dry-runOutbound sidecar lines (outbound|..., PassthroughCluster, BlackHoleCluster) are left out and counted on a line of their own, so a call logged by both sidecars counts once.
Step 4: send it on a schedule
The step reads the file Envoy wrote, so the job must run where that file is: on a self-hosted runner or agent on the Envoy host, or on one that has the log directory mounted. It needs Docker and read access to the file. In Azure Pipelines, replace <your agent pool> with the pool that holds that agent.
name: Graphwake usage
on:
schedule:
- cron: "0 5 * * *"
jobs:
usage:
runs-on: [self-hosted, linux]
steps:
- name: Send the usage summary
env:
GRAPHWAKE_USAGE_KEY: ${{ secrets.GRAPHWAKE_USAGE_KEY }}
run: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.5.0 usage --source envoy < /var/log/envoy/usage.log.github/workflows/graphwake-usage.yml.schedules:
- cron: '0 5 * * *'
displayName: Daily usage summary
branches:
include: [main]
always: true
trigger: none
pr: none
pool:
name: <your agent pool>
steps:
- checkout: none
- bash: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.5.0 usage --source envoy < /var/log/envoy/usage.log
displayName: Send the usage summary
env:
GRAPHWAKE_USAGE_KEY: $(GRAPHWAKE_USAGE_KEY)GRAPHWAKE_USAGE_KEY as a secret variable.Both examples run the agent's Docker image ghcr.io/graphwake/agent:0.5.0 once a day at 05:00 UTC, with the usage key from a secret. The export goes into the container on standard input, which is why docker run has -i.
Each run summarizes the whole file it reads, so rotate the log and point the step at the file that covers the period you want, for example yesterday's rotated file, by changing the path in the examples. Each summary's counts replace the previous one's for the same caller and endpoint, so reading the same lines twice does not add them up. Envoy reopens its access log files when it receives the SIGUSR1 signal or a POST to its admin endpoint /reopen_logs: rename the file, then send one of the two.
For Istio, the job runs where kubectl can read the sidecar logs and Docker is available. In place of the send step, it exports the logs and sends them with --mesh istio. Run the kubectl logs line once for each app you want to map, appending to the file with >> after the first.
kubectl logs -n <namespace> -l app=<app> -c istio-proxy --since=168h --tail=-1 > istio-usage.jsonl
docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.5.0 usage --source envoy --mesh istio < istio-usage.jsonlThe agent does not fail the pipeline: it prints one result line, so a summary that was not sent shows as a warning in the job log, not as a red job (a missing file or image still fails the step, and so does the runner stopping the agent before it finishes, for example when it runs out of memory).
Step 5: claim your callers
After the first summary arrives, open Discovery → Callers in Graphwake.
- When Graphwake can suggest a team for a caller, for example because the names match, Confirm adds the caller to that team and Not us dismisses the suggestion.
- Any caller can be claimed with Claim for my team: a team member claims it for their own team, an Admin for any team.
- Every endpoint a claimed caller uses becomes a subscription of that team, and new endpoints follow with later summaries. The next breaking change on them reaches the team in its own channel.
- A subscription the team removes is not added back, and a caller that stops calling keeps its subscriptions. An Admin can ignore a caller that is not a client, such as a health check.
What is sent
- The caller's name. The value the access log writes as
caller: in the Envoy example theX-Client-Idrequest header, so that header's value is sent as the caller name (of a certificate subject, only the common name is sent). With Istio, the calling workload, sent as<namespace>/<service account>. To read the caller from another member of the log line, name it with--caller-field. Point it at a field that names the client and nothing else: whatever it holds is what is sent as the caller name, unless it is withheld. - The endpoint, as a path template such as
/orders/{}, never the concrete path. - How many calls, and the last day the caller was seen.
Other than the one value you choose as the caller name, nothing from a request leaves your network: no body, header, query string or IP address. What the usage step sends lists every field.
Good to know
- Istio's default access log has no caller in it, so the log provider and the
Telemetryresource in step 2 are required. Do not setomitEmptyValueson the provider. - With Istio, only the inbound side of a call counts, so a call is not counted twice. Outbound sidecar lines are left out and counted.
- With Istio and without mutual TLS, a request has no caller name.
Questions
Does Graphwake need access to our proxies or our cluster?
No. The step runs on a machine that can read the logs, with your own access to them. Graphwake holds no credential for your proxies or your cluster; it receives only the summary.
Why does Istio need its own log provider?
Istio's default access log has no peer identity, so it cannot name the caller. The printed provider adds the calling workload's SPIFFE id, and the Telemetry resource logs the server side only, so a call is not counted twice.
Is Usage Discovery required?
No. It is optional, on Pro and Enterprise. Without it, Graphwake still needs only your spec, and teams subscribe to the endpoints they call.
Pick an endpoint. See who it reaches. 14-day free trial, then a free plan. No credit card needed.
Start free trialSources and last verified
Sources checked on 2026-12-01.