Guide

Find your API consumers from Application Insights dependencies

Last checked 2026-11-197 min read

Azure Application Insights already records the outgoing HTTP calls of the services you instrument, as dependency telemetry. A query exports a week of those calls by calling service, the graphwake usage step turns them into a summary in your own pipeline, and each team confirms its services once in Graphwake. From then on a breaking change reaches the teams whose services really call the endpoint. Usage Discovery is on Pro and Enterprise.

ExampleService graph · orders-api
GET/orders/{id}2 consumer teams
Service
orders-api
Owner
payments-team

Consumers

  • checkout · 4 peopleSlack #team-checkout
  • mobile-app · 6 peopleSlack #mobile-alerts

Suggested by Discovery

  • storefront · uses a neighbouring endpointmaybe · 72
GET/orders/{id}/invoiceBlind spot

No team subscribes to this endpoint. A breaking change here reaches no subscribed team.

Who owns an endpoint, who consumes it, and where nobody is listening. A suggested team is added only when someone confirms it.

Graphwake is for you if

  • Your services send telemetry to Azure Application Insights.
  • Services call each other's APIs, and nobody knows every caller of an endpoint.
  • You want the teams that own the calling services to confirm them once.

Already using Application Insights? Keep it. Graphwake works next to it.

On this page
  1. What you get
  2. Before you start
  3. Step 1: add a usage source
  4. Step 2: export the calls
  5. Step 3: read what would be sent
  6. Step 4: send it on a schedule
  7. Step 5: claim your callers
  8. What is sent
  9. Good to know
  10. Questions

What you get

Graphwake learns which of your services call which endpoints of your other services, and how often. When a team confirms a calling service, every endpoint it uses becomes a subscription of that team.

Optional. Without it, Graphwake still needs only your spec.

Before you start

  • A workspace-based Application Insights resource that receives your services' dependency telemetry, and the ID of its Log Analytics workspace.
  • 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.3.0.
  • A place to run a daily job with Docker and the Azure CLI, such as GitHub Actions or Azure Pipelines, with read access to that workspace.

Step 1: add a usage source

  1. In Graphwake, open Settings → Integrations → Usage sources and choose Add a source.
  2. Copy the usage key. It is shown once. Store it as a secret named GRAPHWAKE_USAGE_KEY in the pipeline that will run the step.

Step 2: export the calls

graphwake usage query --source appinsights prints a query over the HTTP dependency calls of the last 7 days, counted by calling service, host, method and path:

text
// Azure Application Insights (workspace-based): outgoing HTTP calls of your services, last 7 days.
// Run with:  az monitor log-analytics query --workspace <workspace-id> --analytics-query "<this query>" -o json
AppDependencies
| where TimeGenerated > ago(7d) and DependencyType startswith "http"
| extend u = parse_url(Data)
| extend Host = tolower(iff(isempty(tostring(u.Host)), Target, tostring(u.Host))),
         Path = strcat("/", trim_start(@"/", tostring(u.Path))),
         Method = extract(@"^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s", 1, Name)
| summarize Calls = sum(ItemCount), LastSeen = max(TimeGenerated) by AppRoleName, Host, Method, Path
What graphwake usage query --source appinsights prints.

The query reads the AppDependencies table of the Log Analytics workspace behind your Application Insights resource, so run it against that workspace, with the Azure CLI signed in with an identity that can read it. az monitor log-analytics query comes with the CLI's log-analytics extension. Replace <workspace-id> with the workspace ID shown on the workspace's overview:

bash
az extension add --name log-analytics
az monitor log-analytics query --workspace <workspace-id> --analytics-query "$(graphwake usage query --source appinsights)" -o json > dependencies.json

With the Docker image instead of the binary, take the query from the image: az monitor log-analytics query --workspace <workspace-id> --analytics-query "$(docker run --rm ghcr.io/graphwake/agent:0.3.0 usage query --source appinsights)" -o json > dependencies.json.

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.

bash
export GRAPHWAKE_USAGE_KEY=<your usage key>
graphwake usage --source appinsights --input dependencies.json --dry-run

With the Docker image instead, give it the file on standard input: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.3.0 usage --source appinsights --dry-run < dependencies.json.

text
--- would send ---
{"preset":"apim","agentVersion":"0.3.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: 7
Example output from an Azure API Management export, with the JSON broken over lines. Yours names your preset and lists your own callers and endpoints.

Requests 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.

Step 4: send it on a schedule

Run the export and the step once a day, in a pipeline that signs in to Azure with its own identity: in GitHub Actions a federated credential through azure/login, in Azure Pipelines a service connection. Graphwake never gets that identity. In Azure Pipelines, replace <service-connection> with the name of an Azure Resource Manager service connection that can read the workspace.

yaml
name: Graphwake usage
on:
  schedule:
    - cron: "0 5 * * *"

permissions:
  id-token: write
  contents: read

jobs:
  usage:
    runs-on: ubuntu-latest
    steps:
      - uses: azure/login@v3
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
      - name: Export the dependency calls
        run: |
          az extension add --name log-analytics
          QUERY="$(docker run --rm ghcr.io/graphwake/agent:0.3.0 usage query --source appinsights)"
          az monitor log-analytics query --workspace <workspace-id> --analytics-query "$QUERY" -o json > dependencies.json
      - 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.3.0 usage --source appinsights < dependencies.json
GitHub Actions: .github/workflows/graphwake-usage.yml.
yaml
schedules:
  - cron: '0 5 * * *'
    displayName: Daily usage summary
    branches:
      include: [main]
    always: true

trigger: none
pr: none

pool:
  vmImage: ubuntu-latest

steps:
  - checkout: none
  - task: AzureCLI@2
    displayName: Export the dependency calls
    inputs:
      azureSubscription: <service-connection>
      scriptType: bash
      scriptLocation: inlineScript
      inlineScript: |
        az extension add --name log-analytics
        QUERY="$(docker run --rm ghcr.io/graphwake/agent:0.3.0 usage query --source appinsights)"
        az monitor log-analytics query --workspace <workspace-id> --analytics-query "$QUERY" -o json > dependencies.json
  - bash: docker run --rm -i -e GRAPHWAKE_USAGE_KEY ghcr.io/graphwake/agent:0.3.0 usage --source appinsights < dependencies.json
    displayName: Send the usage summary
    env:
      GRAPHWAKE_USAGE_KEY: $(GRAPHWAKE_USAGE_KEY)
Azure Pipelines: a pipeline of its own, with GRAPHWAKE_USAGE_KEY as a secret variable.

Both examples run the agent's Docker image ghcr.io/graphwake/agent:0.3.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.

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 calling service's role name (AppRoleName, or cloud_RoleName in classic Application Insights).
  • 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.

Note

Good to know

  • Application Insights samples by default, so counts are approximate and a rarely called endpoint can be missing.
  • For calls that go through a gateway, the target is usually the gateway's address: add a mapping on the usage source so those calls reach the right service.
See who your next breaking change reaches.Paste a spec URL or add one CI step. 7-day free trial. Cancel before day 7 and you pay nothing.
Start free trial

Questions

Does Graphwake need access to our Application Insights resource?

No. The query runs in your own pipeline against your Log Analytics workspace, with the pipeline's own Azure identity. Graphwake holds no credential for your cloud or your monitoring; it receives only the summary.

Why do calls through our gateway not match an endpoint?

Their target is usually the gateway's address, which your spec does not know. Add a mapping on the usage source that sends the gateway's host or path prefix to the right service, then run the dry run again.

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. 7-day free trial. Cancel before day 7 and you pay nothing.

Start free trial

Sources and last verified

Sources checked on 2026-11-19.