Cosmos DB Log Analytics

David Baker 21 Reputation points
2022-05-19T16:37:41.107+00:00

In Cosmos DB Log Analytics the CDBDataPlaneRequests contains a RequestResourceId field. When cosmos docs are updated via REST API the RequestResourceId contains the doc id, but if a doc is updated via the .net Cosmos DB SDK v3 RequestResourceId is set to the container id, not the doc id. Does anyone know if RequestResourceId can be set to the doc id via the .net Cosmos DB SDK? Thanks.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Oury Ba-MSFT 21,121 Reputation points Microsoft Employee Moderator
    2022-05-20T21:18:49.777+00:00

    Hi @David Baker Thank you for posting your query on Microsoft Q&A and for using Azure services.
    From my understanding you are asking if RequestResourceId can be set to the doc id via the .net Cosmos DB SDK.

    The SDK does not populate any of the data on CDBDataPlaneRequests.Requests from the SDK. Requests from the SDK follow the RESTAPI contract.
    A Replace operation will have the Url with the document Id. An Upsert operation will not
    If you are doing Upsert on the SDK, then the id won't be on the Url.

    Regards,
    Oury

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.