Azure / azure-docs-sdk-java

☕️ Azure SDK for Java API documentation repository. Content here is mostly auto-generated.
https://docs.microsoft.com/java/api/?view=azure-java-stable
Creative Commons Attribution 4.0 International
58 stars 244 forks source link

Dependency tracking for CosmosDB and RabbitMQ #678

Open abhiramani-iptiq opened 6 years ago

abhiramani-iptiq commented 6 years ago

Hi Step 5 under heading:Configure your downloaded Spring Boot Application to use Application Insights shows: telemetryClient.trackDependency("SQL", "Insert", new Duration(0, 0, 1, 1, 1), true); how to track SQL dependency

we have dependency on Azure CosmosDB and RabbitMQ.are these 2 dependency supported? and what would be exact syntax to add those dependency?

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

dhaval24 commented 6 years ago

@abhiramani-iptiq thanks for creating an issue. The telemetryClient.trackDependency() is purely an API which you can use to manually wrap any dependency calls that you would like to track. This API is not used for automatic dependency collection. So yes, you can do something like this

telemetryClient.trackDependency(dependencyName, command, duration, success)

Please remember that you would need to manually track the success of the command, the name of the command you are using and the timing.

Automatic dependency collection using Application Insights Java Agent https://docs.microsoft.com/en-us/azure/application-insights/app-insights-java-agent is only supported for MySQL, MsSQL, Oracle DB and Redis.

petetian commented 5 years ago

applicationinsights-spring-boot-starter 1.1.1 ceased working. Upgrading to 2.4.1, it works like charm with spring boot 2.1.7. Is it possible to let Spring Boot start parent manage the version of this artifact, so developers don't need to handle compatibility manually?