A walkthrough of implementing custom usage tracking for Azure Content Understanding via Azure API Management (APIM). The approach intercepts outbound responses using APIM policies, extracts usage metadata (analyzer ID, operation ID, status, usage fields) from completed analysis results, and forwards structured events to an Azure Service Bus topic. Key implementation details include buffering binary PDF request bodies, rewriting the Operation-Location header to route SDK polling back through APIM so outbound policies fire, and injecting a tenant ID header from the .NET client using a custom HttpPipelineSynchronousPolicy.

3m read timeFrom jaliyaudagedara.blogspot.com
Post cover image

Sort: