[Telemetry] Version checking code for optional dependencies.