Instrumenting an app for monitoring

Monitor and Troubleshoot Azure Solutions

Ebadur Osib

Senior Cloud Consulting Engineer

Instrumentation vs application insights

instrumentationvsapplicationinsights.jpg

Monitor and Troubleshoot Azure Solutions

Instrumenting an app for monitoring

nodata.jpg

Monitor and Troubleshoot Azure Solutions

Instrumentation

questionmarkapp.jpg

connectedapp.jpg

Monitor and Troubleshoot Azure Solutions

What is app instrumentation?

appemittingtelemetry.jpg

 

  • Adds monitoring code.
  • Enabled telemetry collection:
    • request rates
    • response times
    • errors
    • dependencies
  • Sends data to Azure monitor and application insights.
Monitor and Troubleshoot Azure Solutions

Auto-instrumentation

 

  • Supported for common Azure services:
    • App services
    • Azure functions
  • Minimal configuration.
  • No manual code changes.

  InsightsOn.jpg

Monitor and Troubleshoot Azure Solutions

Auto-instrumentation in action

autoinstrumentation-in-action.jpg

Monitor and Troubleshoot Azure Solutions

What Azure injects automatically

layreddiagram.jpg

 

  • Injects Application Insights agent into the runtime environment.
  • Agent leverages runtime-level SDK hooks.
  • Telemetry is emitted automatically.
  • No explicit SDK references are required.
Monitor and Troubleshoot Azure Solutions

The silent failure

silentfailure.jpg

Monitor and Troubleshoot Azure Solutions

The silent failure

silentfailure2.jpg

silentfailure3.jpg

Monitor and Troubleshoot Azure Solutions

Manual instrumentation

 

  • SDK added to app code.
  • More control.
  • Custom telemetry for:
    • events
    • business metrics
    • detailed traces

codesnippet.jpg

Monitor and Troubleshoot Azure Solutions

Keys and connections

  • Telemetry requires a destination.
  • Defined by connection string.
  • Auto-instrumentations configures automatically.
  • Manual instrumentation requires explicit location.
  • Required for telemetry.

connectionstring.jpg

Monitor and Troubleshoot Azure Solutions

Environment variables

environmentvariables.jpg

Monitor and Troubleshoot Azure Solutions

Troubleshooting

 

  • Make sure application insights is enabled.
  • Ensure usage of correct connection string.
  • Check for supported runtime and service.
  • No conflicting SDK configuration.

checklist.jpg

Monitor and Troubleshoot Azure Solutions

Summary

summary.jpg

 

  • Instrumentation makes applications observable.
  • Auto-instrumentation requires no code changes.
  • Enabled at platform level.
  • Uses environment-based configuration.
  • Provides fast and consistent visibility.
  • Form the foundation for deeper monitoring
Monitor and Troubleshoot Azure Solutions

Let's practice!

Monitor and Troubleshoot Azure Solutions

Preparing Video For Download...