frigus02 / opentelemetry-application-insights

OpenTelemetry exporter for Azure Application Insights
MIT License
22 stars 12 forks source link

Automated test for http request content #45

Closed frigus02 closed 2 years ago

frigus02 commented 2 years ago

As of today I have manually tested every release to ensure to communication with Application Insights still works:

  1. Run reqwest blocking example (test blocking)
  2. Run reqwest example (test tokio)
  3. Run surf example (test async-std)
  4. Run opentelemetry example (test trace correlation)
  5. Run attributes example (test attribute mapping)
  6. Run metrics example (test metrics)
  7. Check Azure Portal to ensure data shows up as intended

This is time consuming and error prone. It would be nice to automate those tests.

This is an attempt for it, which captures the HTTP requests this exporter would send to Azure and writes them to a snapshot file. Assuming Application Insights' behavior doesn't change this should be enough to ensure the integration works.

Metrics tests are still missing here. But metrics currently don't use the HttpClient trait because the exporter is synchronous. Maybe later.