-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing CorrelationActivityId to be sent to BE and retrieved from FeedResponse #26908
Allowing CorrelationActivityId to be sent to BE and retrieved from FeedResponse #26908
Conversation
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
…to users/fabianm/QueryCorrelationId
API changes have been detected in API changes + public UUID getCorrelationActivityId() |
…relationActivityId is used
sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosItemTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosItemTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/FeedResponse.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosQueryRequestOptions.java
Show resolved
Hide resolved
...s/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosItemTest.java
Show resolved
Hide resolved
...cosmos-spark_3_2-12/src/main/scala/com/azure/cosmos/spark/diagnostics/SparkTaskContext.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
...s/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java
Show resolved
Hide resolved
...cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUUID.java
Show resolved
Hide resolved
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
API changes have been detected in API changes - public CosmosBulkExecutionOptions(CosmosBulkExecutionThresholdsState thresholdsState, Map<String, String> customOptions)
+ public UUID getCorrelationActivityId() |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
Adds an (internal) API to specify a CorrelationActviityId in
CosmosQueryRequestOptions
- if not set a new UUID will be generated for each query. This CorrelationActivityId is sent to the backend (and used in Kusto logs for SqlQueryExecMetrics) to allow correlating client-logs with service telemetry. TheFeedResponse
has a new public property that allows retrieving the CorrelationActivityId for document query responses.This PR also wires up the correlation activity id with the Spark connector.
Important design aspects
The Api to allow specifying a custom correlation activity Id in
CosmosQueryRequestOptions
is currently internal - not public - to avoid cases where customers accidentally or intentionally force the same constant UUID value for all query requests - this would result in losing ability to correlate service telemetry. So, this option is only used in Spark where we use the concept of a correlation Id across multiple different operations already within the Spark layer.Other customers can get the correlationId generated per query from the
FeedResponse
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines