azure-sdk-for-java
azure-sdk-for-java copied to clipboard
Baseline to allow providing MeterRegistry for client metrics
Description
This PR adds the option to emit metrics from the Azure Cosmos DB SDK via a micrometer MeterRegistry as well as doing so from the Spark connector via configuration.
Please take a look at the following to markup files with more information:
-
sdk/cosmos/azure-cosmos/docs/Metrics.md
-
sdk/cosmos/azure-cosmos-spark_3_2-12/docs/metrics.md
Perf results (point reads of <1KB docs - worst case for overhead of enabling metrics)
Scenario | 1-minute request rate per second | P99.9 latency | P99 latency | Difference |
---|---|---|---|---|
Baseline | 17,947.58 | 9.50 ms | 3.28 ms | n/a |
PR without metrics | 17,736.32 | 10.49 ms | 3.69 ms | -1.17 % |
PR with metrics | 15,513.67 | 8.52 ms | 3.34 ms | -12.53 % |
Perf results (point writesof <1KB docs)
Scenario | 1-minute request rate per second | P99.9 latency | P99 latency | Difference |
---|---|---|---|---|
Baseline | 9,934.08 | 19.01 ms | 9.70 ms | n/a |
PR without metrics | 9,873.45 | 13.96 ms | 9.57 ms | -0.61 % |
PR with metrics | 9,728.54 | 15.34 ms | 9.50 ms | -2.06 % |
All SDK Contribution checklist:
- [x] The pull request does not introduce [breaking changes]
- [x] CHANGELOG is updated for new features, bug fixes or other significant changes.
- [x] I have read the contribution guidelines.
General Guidelines and Best Practices
- [x] Title of the pull request is clear and informative.
- [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
Testing Guidelines
- [x] Pull request includes test coverage for the included changes.
API change check
APIView has identified API level changes in this PR and created following API reviews.
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:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).
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:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run java - [service] - ci
/azp run java - cosmos - ci
Azure Pipelines successfully started running 1 pipeline(s).
Raw output for write perf tests PR_With_Metrics_write_output.txt PR_Without_Metrics_write_output.txt Baseline_write_output.txt
Customer need to use micrometer-registry-azure-monitor lib for app insight which is build on top of Application Insights Java 2.x .
App insight team moved to a model of agent based from V3 onward https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-2x-micrometer ,not sure if micrometer will have the new implementation for app insight
Lets please check and analyze
/azp run java - cosmos - ci
Azure Pipelines successfully started running 1 pipeline(s).
Customer need to use micrometer-registry-azure-monitor lib for app insight which is build on top of Application Insights Java 2.x . App insight team moved to a model of agent based from V3 onward https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-2x-micrometer ,not sure if micrometer will have the new implementation for app insight Lets please check and analyze
Only within spark connector (which shades that library). App Insights SDK V3 isn't GA yet - once GA we can change the Spark connector to use it - transparent to the user because of shading)