On this page
What you get
Graphwake learns which callers use which of your endpoints behind the load balancer, 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
- Access logs turned on for the load balancer, written to an S3 bucket with the bucket policy AWS documents for them.
- 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. - A place to run a daily job with Docker and the AWS CLI, such as GitHub Actions or Azure Pipelines, with permission to list and read the log files in the bucket (
s3:ListBucketands3:GetObject).
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
The load balancer writes its access logs to an S3 bucket as compressed .log.gz files, and the step reads them as they are. graphwake usage query --source alb prints how to turn the logs on and copy them, and how the caller is chosen:
# AWS Application Load Balancer: turn on access logs, which the load balancer writes to an
# S3 bucket as .log.gz files (the bucket needs the bucket policy AWS documents for them):
# aws elbv2 modify-load-balancer-attributes --load-balancer-arn <load balancer ARN> \
# --attributes Key=access_logs.s3.enabled,Value=true Key=access_logs.s3.bucket,Value=<bucket>
# Then send the .log.gz files as they are: compressed, one file or several joined with cat.
# aws s3 cp s3://<bucket>[/<prefix>]/AWSLogs/<account id>/elasticloadbalancing/<region>/<yyyy>/<mm>/<dd>/ alb-logs/ \
# --recursive --exclude '*' --include '*.log.gz'
# cat alb-logs/*.log.gz | graphwake usage --source alb
# One file can also be streamed: aws s3 cp s3://<bucket>/<key>.log.gz - | graphwake usage --source alb
# The request line gives the method, host and path; the query string is dropped in the agent.
# The caller:
# 1. with --caller-map, a CIDR row that holds the client address (client:port) names it;
# 2. else the first product of the user agent, without its version ("checkout-service/2.4.1
# (linux)" gives checkout-service), which an exact row of the map may rename;
# 3. a browser (Mozilla) or a generic HTTP library (curl, okhttp, python-requests, Java,
# aws-sdk-*, ...) is unnamed: only an exact row of the caller map with the product as
# the log writes it, such as okhttp,payments-android, gives it a name.
# Let every service send its own user agent, <service-name>/<version>.
# The client address and the user agent are never sent.graphwake usage query --source alb prints.Turn the logs on with the aws elbv2 modify-load-balancer-attributes command it prints. Then copy a day's files and join them into one input; if you set a prefix for the logs, it goes after the bucket name:
aws s3 cp s3://<bucket>/AWSLogs/<account id>/elasticloadbalancing/<region>/<yyyy>/<mm>/<dd>/ alb-logs/ \
--recursive --exclude '*' --include '*.log.gz'
cat alb-logs/*.log.gz > alb-usage.log.gzSeveral .log.gz files joined with cat are one input. The step reads the time, the client address, the request line and the user agent of each entry, and drops the query string before matching.
The caller is chosen in this order: a CIDR row of your caller map that holds the client address; else the user agent's first product without its version, so checkout-service/2.4.1 (linux) gives checkout-service. A browser (Mozilla) or a generic HTTP library such as okhttp, curl, python-requests, Java or aws-sdk-* names no caller, unless an exact row of the caller map names that product as the log writes it, such as okhttp,payments-android. So let every service send its own user agent, <service-name>/<version>.
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 alb --input alb-usage.log.gz --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 alb --dry-run < alb-usage.log.gz.
--- 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.
A caller map names the callers the log knows only by an address or by a generic user agent: a CSV file you keep next to the pipeline. Each row is match,name: match is an exact value, compared letter case included, or an address range such as 10.2.0.0/16, and name is the caller name sent instead. A mapped name still goes through the withholding rules. The caller map file, and the raw values it maps, are never sent.
match,name
10.2.0.0/16,billing-batch
okhttp,payments-androidcallers.csv: an example caller map. The header line is optional.graphwake usage --source alb --input alb-usage.log.gz --caller-map callers.csv --dry-runWith a caller map the dry run also prints how many requests the map named and how many were left unnamed. A row that cannot be used, such as an invalid range, an empty name or a match an earlier row has, stops the run before the input is read: nothing is sent, and the warning names the row number only.
Step 4: send it on a schedule
The job can run on a hosted runner; the export reads the bucket with AWS credentials. GitHub Actions takes them from an IAM role through OpenID Connect (role-to-assume, with id-token: write); Azure Pipelines from the secret variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. The credentials need s3:ListBucket and s3:GetObject on the bucket and its objects. Replace <region>, <bucket> and <account id> with your own.
name: Graphwake usage
on:
schedule:
- cron: "0 5 * * *"
permissions:
id-token: write
contents: read
jobs:
usage:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: <region>
- name: Copy yesterday's access logs
run: |
DAY=$(date -u -d yesterday +%Y/%m/%d)
aws s3 cp s3://<bucket>/AWSLogs/<account id>/elasticloadbalancing/<region>/$DAY/ alb-logs/ --recursive --exclude '*' --include '*.log.gz'
cat alb-logs/*.log.gz > alb-usage.log.gz
- 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 alb < alb-usage.log.gz.github/workflows/graphwake-usage.yml.schedules:
- cron: '0 5 * * *'
displayName: Daily usage summary
branches:
include: [main]
always: true
trigger: none
pr: none
pool:
vmImage: ubuntu-latest
steps:
- checkout: none
- bash: |
DAY=$(date -u -d yesterday +%Y/%m/%d)
aws s3 cp s3://<bucket>/AWSLogs/<account id>/elasticloadbalancing/<region>/$DAY/ alb-logs/ --recursive --exclude '*' --include '*.log.gz'
cat alb-logs/*.log.gz > alb-usage.log.gz
displayName: Copy yesterday's access logs
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
AWS_DEFAULT_REGION: <region>
- bash: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.5.0 usage --source alb < alb-usage.log.gz
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 copies yesterday's folder and reads those files. The load balancer files each log by the day it was delivered, so a request from just before midnight can be in the next day's folder. Each summary's counts replace the previous one's for the same caller and endpoint, so reading the same files twice does not add them up.
To use the caller map in the schedule, keep callers.csv in the repository that holds the pipeline, check the repository out in the job (in GitHub Actions add the actions/checkout step first; in Azure Pipelines replace checkout: none with checkout: self), and give the file to the container: docker run --rm -i -e GRAPHWAKE_USAGE_KEY -v "$PWD/callers.csv:/callers.csv:ro" ghcr.io/graphwake/agent:0.5.0 usage --source alb --caller-map /callers.csv < alb-usage.log.gz.
The 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 name your caller map gives the range that holds the client address, else the user agent's product name without its version, which an exact row of the map may rename. The client address and the user agent themselves are never sent.
- 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
- Classic Load Balancer access logs are not read.
- A browser or a generic HTTP library, such as
curl,okhttporpython-requests, names no caller unless an exact row of your caller map names that product. - Let each service send its own user agent,
<service-name>/<version>, so its calls carry its name. - The client address and the user agent are never sent: only the product name, or the name your caller map gives.
- AWS logs the requests on a best-effort basis, so counts are approximate.
Questions
Does Graphwake need access to our AWS account?
No. The copy runs in your pipeline with your own AWS credentials. Graphwake holds no credential for your load balancer or your cloud; it receives only the summary.
Are IP addresses or user agents sent?
No. The client address is only compared with your caller map's ranges, and of the user agent only the product name is used, without its version. The caller map file, and the raw values it maps, are never sent.
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.