compose icon indicating copy to clipboard operation
compose copied to clipboard

Optimize tracing for Docker Compose projects

Open HajimohammadiNet opened this issue 1 year ago • 1 comments

Summary

This pull request optimizes the OpenTelemetry tracing functionality for Docker Compose projects. Key improvements include:

  • Pre-allocating slices in ProjectOptions, ServiceOptions, and ContainerOptions to minimize memory allocations and improve execution speed.
  • Simplified utility functions (keys, getSourceNames, etc.) for readability and maintainability.
  • Optimized the project hash calculation by using direct formatting of the hash output.
  • Improved tracing instrumentation by reducing redundant conversions between SpanStartOption and SpanStartEventOption.
  • Enhanced metadata collection for Docker containers, services, and Compose projects.

Testing

  • Unit tests have been added to cover the new functionality.
  • The full test suite, including end-to-end tests, has been run locally and passed without errors.

Issue Reference

Closes #12217

HajimohammadiNet avatar Oct 16 '24 14:10 HajimohammadiNet

please sign off your commit, this is a legal requirement for all contributions on this repo

about your PR, afaict you just added a few explicit casts which have no (?) impact, as compiler already manages. What about the other improvements you listed here ?

ndeloof avatar Oct 18 '24 06:10 ndeloof

closing for inactivity

ndeloof avatar Nov 15 '24 10:11 ndeloof